godot/core/os/os.cpp

/**************************************************************************/
/*  os.cpp                                                                */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "os.h"

#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/json.h"
#include "core/os/midi_driver.h"
#include "core/version_generated.gen.h"

#include <stdarg.h>

#ifdef MINGW_ENABLED
#define MINGW_STDTHREAD_REDUNDANCY_WARNING
#include "thirdparty/mingw-std-threads/mingw.thread.h"
#define THREADING_NAMESPACE
#else
#include <thread>
#define THREADING_NAMESPACE
#endif

OS *OS::singleton =;
uint64_t OS::target_ticks =;

OS *OS::get_singleton() {}

uint64_t OS::get_ticks_msec() const {}

double OS::get_unix_time() const {}

void OS::_set_logger(CompositeLogger *p_logger) {}

void OS::add_logger(Logger *p_logger) {}

String OS::get_identifier() const {}

void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify, Logger::ErrorType p_type) {}

void OS::print(const char *p_format, ...) {}

void OS::print_rich(const char *p_format, ...) {}

void OS::printerr(const char *p_format, ...) {}

void OS::alert(const String &p_alert, const String &p_title) {}

void OS::set_low_processor_usage_mode(bool p_enabled) {}

bool OS::is_in_low_processor_usage_mode() const {}

void OS::set_low_processor_usage_mode_sleep_usec(int p_usec) {}

int OS::get_low_processor_usage_mode_sleep_usec() const {}

void OS::set_delta_smoothing(bool p_enabled) {}

bool OS::is_delta_smoothing_enabled() const {}

String OS::get_executable_path() const {}

int OS::get_process_id() const {}

bool OS::is_stdout_verbose() const {}

bool OS::is_stdout_debug_enabled() const {}

bool OS::is_stdout_enabled() const {}

bool OS::is_stderr_enabled() const {}

void OS::set_stdout_enabled(bool p_enabled) {}

void OS::set_stderr_enabled(bool p_enabled) {}

int OS::get_exit_code() const {}

void OS::set_exit_code(int p_code) {}

String OS::get_locale() const {}

// Non-virtual helper to extract the 2 or 3-letter language code from
// `get_locale()` in a way that's consistent for all platforms.
String OS::get_locale_language() const {}

// Embedded PCK offset.
uint64_t OS::get_embedded_pck_offset() const {}

// Helper function to ensure that a dir name/path will be valid on the OS
String OS::get_safe_dir_name(const String &p_dir_name, bool p_allow_paths) const {}

// Path to data, config, cache, etc. OS-specific folders

// Get properly capitalized engine name for system paths
String OS::get_godot_dir_name() const {}

// OS equivalent of XDG_DATA_HOME
String OS::get_data_path() const {}

// OS equivalent of XDG_CONFIG_HOME
String OS::get_config_path() const {}

// OS equivalent of XDG_CACHE_HOME
String OS::get_cache_path() const {}

// Path to macOS .app bundle resources
String OS::get_bundle_resource_dir() const {}

// Path to macOS .app bundle embedded icon
String OS::get_bundle_icon_path() const {}

// OS specific path for user://
String OS::get_user_data_dir() const {}

// Absolute path to res://
String OS::get_resource_dir() const {}

// Access system-specific dirs like Documents, Downloads, etc.
String OS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {}

Error OS::shell_open(const String &p_uri) {}

Error OS::shell_show_in_file_manager(String p_path, bool p_open_folder) {}
// implement these with the canvas?

uint64_t OS::get_static_memory_usage() const {}

uint64_t OS::get_static_memory_peak_usage() const {}

Error OS::set_cwd(const String &p_cwd) {}

Dictionary OS::get_memory_info() const {}

void OS::yield() {}

void OS::ensure_user_data_dir() {}

String OS::get_model_name() const {}

void OS::set_cmdline(const char *p_execpath, const List<String> &p_args, const List<String> &p_user_args) {}

String OS::get_unique_id() const {}

int OS::get_processor_count() const {}

String OS::get_processor_name() const {}

void OS::set_has_server_feature_callback(HasServerFeatureCallback p_callback) {}

bool OS::has_feature(const String &p_feature) {}

bool OS::is_sandboxed() const {}

void OS::set_restart_on_exit(bool p_restart, const List<String> &p_restart_arguments) {}

bool OS::is_restart_on_exit_set() const {}

List<String> OS::get_restart_on_exit_arguments() const {}

PackedStringArray OS::get_connected_midi_inputs() {}

void OS::open_midi_inputs() {}

void OS::close_midi_inputs() {}

void OS::add_frame_delay(bool p_can_draw) {}

Error OS::setup_remote_filesystem(const String &p_server_host, int p_port, const String &p_password, String &r_project_path) {}

OS::PreferredTextureFormat OS::get_preferred_texture_format() const {}

void OS::set_use_benchmark(bool p_use_benchmark) {}

bool OS::is_use_benchmark_set() {}

void OS::set_benchmark_file(const String &p_benchmark_file) {}

String OS::get_benchmark_file() {}

void OS::benchmark_begin_measure(const String &p_context, const String &p_what) {}
void OS::benchmark_end_measure(const String &p_context, const String &p_what) {}

void OS::benchmark_dump() {}

OS::OS() {}

OS::~OS() {}