[−][src]Struct gdnative::OS
core singleton class OS
inherits Object
(unsafe).
Official documentation
See the documentation of this class in the Godot engine's official documentation.
Class hierarchy
OS inherits methods from:
Methods
impl OS
[src]
Constants
pub const DAY_MONDAY: i64
[src]
pub const VIDEO_DRIVER_GLES3: i64
[src]
pub const SCREEN_ORIENTATION_PORTRAIT: i64
[src]
pub const SYSTEM_DIR_RINGTONES: i64
[src]
pub const MONTH_AUGUST: i64
[src]
pub const SCREEN_ORIENTATION_LANDSCAPE: i64
[src]
pub const MONTH_JANUARY: i64
[src]
pub const POWERSTATE_CHARGING: i64
[src]
pub const SCREEN_ORIENTATION_REVERSE_LANDSCAPE: i64
[src]
pub const MONTH_APRIL: i64
[src]
pub const SYSTEM_DIR_DOCUMENTS: i64
[src]
pub const SYSTEM_DIR_DCIM: i64
[src]
pub const VIDEO_DRIVER_GLES2: i64
[src]
pub const MONTH_MARCH: i64
[src]
pub const MONTH_OCTOBER: i64
[src]
pub const DAY_SUNDAY: i64
[src]
pub const MONTH_DECEMBER: i64
[src]
pub const SCREEN_ORIENTATION_SENSOR_PORTRAIT: i64
[src]
pub const SYSTEM_DIR_DESKTOP: i64
[src]
pub const SCREEN_ORIENTATION_SENSOR_LANDSCAPE: i64
[src]
pub const SYSTEM_DIR_MOVIES: i64
[src]
pub const MONTH_FEBRUARY: i64
[src]
pub const DAY_FRIDAY: i64
[src]
pub const SCREEN_ORIENTATION_SENSOR: i64
[src]
pub const POWERSTATE_CHARGED: i64
[src]
pub const DAY_TUESDAY: i64
[src]
pub const DAY_THURSDAY: i64
[src]
pub const DAY_SATURDAY: i64
[src]
pub const DAY_WEDNESDAY: i64
[src]
pub const MONTH_JUNE: i64
[src]
pub const POWERSTATE_UNKNOWN: i64
[src]
pub const MONTH_MAY: i64
[src]
pub const MONTH_NOVEMBER: i64
[src]
pub const MONTH_JULY: i64
[src]
pub const MONTH_SEPTEMBER: i64
[src]
pub const POWERSTATE_NO_BATTERY: i64
[src]
pub const SYSTEM_DIR_MUSIC: i64
[src]
pub const SYSTEM_DIR_PICTURES: i64
[src]
pub const SCREEN_ORIENTATION_REVERSE_PORTRAIT: i64
[src]
pub const POWERSTATE_ON_BATTERY: i64
[src]
pub const SYSTEM_DIR_DOWNLOADS: i64
[src]
impl OS
[src]
pub fn godot_singleton() -> OS
[src]
pub fn alert(&mut self, text: GodotString, title: GodotString)
[src]
pub fn can_draw(&self) -> bool
[src]
pub fn can_use_threads(&self) -> bool
[src]
pub fn center_window(&mut self)
[src]
pub fn close_midi_inputs(&mut self)
[src]
pub fn delay_msec(&self, msec: i64)
[src]
pub fn delay_usec(&self, usec: i64)
[src]
pub fn dump_memory_to_file(&mut self, file: GodotString)
[src]
pub fn dump_resources_to_file(&mut self, file: GodotString)
[src]
pub fn execute(
&mut self,
path: GodotString,
arguments: StringArray,
blocking: bool,
output: VariantArray,
read_stderr: bool
) -> i64
[src]
&mut self,
path: GodotString,
arguments: StringArray,
blocking: bool,
output: VariantArray,
read_stderr: bool
) -> i64
pub fn find_scancode_from_string(&self, string: GodotString) -> i64
[src]
pub fn get_audio_driver_count(&self) -> i64
[src]
pub fn get_audio_driver_name(&self, driver: i64) -> GodotString
[src]
pub fn get_borderless_window(&self) -> bool
[src]
pub fn get_clipboard(&self) -> GodotString
[src]
pub fn get_cmdline_args(&mut self) -> StringArray
[src]
pub fn get_connected_midi_inputs(&mut self) -> StringArray
[src]
pub fn get_current_screen(&self) -> i64
[src]
pub fn get_current_video_driver(&self) -> OSVideoDriver
[src]
pub fn get_date(&self, utc: bool) -> Dictionary
[src]
pub fn get_datetime(&self, utc: bool) -> Dictionary
[src]
pub fn get_datetime_from_unix_time(&self, unix_time_val: i64) -> Dictionary
[src]
pub fn get_dynamic_memory_usage(&self) -> i64
[src]
pub fn get_environment(&self, environment: GodotString) -> GodotString
[src]
pub fn get_executable_path(&self) -> GodotString
[src]
pub fn get_exit_code(&self) -> i64
[src]
pub fn get_granted_permissions(&self) -> StringArray
[src]
pub fn get_ime_selection(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_ime_text(&self) -> GodotString
[src]
pub fn get_latin_keyboard_variant(&self) -> GodotString
[src]
pub fn get_locale(&self) -> GodotString
[src]
pub fn get_low_processor_usage_mode_sleep_usec(&self) -> i64
[src]
pub fn get_max_window_size(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_min_window_size(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_model_name(&self) -> GodotString
[src]
pub fn get_name(&self) -> GodotString
[src]
pub fn get_power_percent_left(&mut self) -> i64
[src]
pub fn get_power_seconds_left(&mut self) -> i64
[src]
pub fn get_power_state(&mut self) -> OSPowerState
[src]
pub fn get_process_id(&self) -> i64
[src]
pub fn get_processor_count(&self) -> i64
[src]
pub fn get_real_window_size(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_scancode_string(&self, code: i64) -> GodotString
[src]
pub fn get_screen_count(&self) -> i64
[src]
pub fn get_screen_dpi(&self, screen: i64) -> i64
[src]
pub fn get_screen_orientation(&self) -> OSScreenOrientation
[src]
pub fn get_screen_position(&self, screen: i64) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_screen_size(&self, screen: i64) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_splash_tick_msec(&self) -> i64
[src]
pub fn get_static_memory_peak_usage(&self) -> i64
[src]
pub fn get_static_memory_usage(&self) -> i64
[src]
pub fn get_system_dir(&self, dir: i64) -> GodotString
[src]
pub fn get_system_time_msecs(&self) -> i64
[src]
pub fn get_system_time_secs(&self) -> i64
[src]
pub fn get_ticks_msec(&self) -> i64
[src]
pub fn get_ticks_usec(&self) -> i64
[src]
pub fn get_time(&self, utc: bool) -> Dictionary
[src]
pub fn get_time_zone_info(&self) -> Dictionary
[src]
pub fn get_unique_id(&self) -> GodotString
[src]
pub fn get_unix_time(&self) -> i64
[src]
pub fn get_unix_time_from_datetime(&self, datetime: Dictionary) -> i64
[src]
pub fn get_user_data_dir(&self) -> GodotString
[src]
pub fn get_video_driver_count(&self) -> i64
[src]
pub fn get_video_driver_name(&self, driver: i64) -> GodotString
[src]
pub fn get_virtual_keyboard_height(&mut self) -> i64
[src]
pub fn get_window_per_pixel_transparency_enabled(&self) -> bool
[src]
pub fn get_window_position(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn get_window_safe_area(&self) -> Rect<f32, UnknownUnit>
[src]
pub fn get_window_size(&self) -> Vector2D<f32, UnknownUnit>
[src]
pub fn global_menu_add_item(
&mut self,
menu: GodotString,
label: GodotString,
id: Variant,
meta: Variant
)
[src]
&mut self,
menu: GodotString,
label: GodotString,
id: Variant,
meta: Variant
)
pub fn global_menu_add_separator(&mut self, menu: GodotString)
[src]
pub fn global_menu_clear(&mut self, menu: GodotString)
[src]
pub fn global_menu_remove_item(&mut self, menu: GodotString, idx: i64)
[src]
pub fn has_environment(&self, environment: GodotString) -> bool
[src]
pub fn has_feature(&self, tag_name: GodotString) -> bool
[src]
pub fn has_touchscreen_ui_hint(&self) -> bool
[src]
pub fn has_virtual_keyboard(&self) -> bool
[src]
pub fn hide_virtual_keyboard(&mut self)
[src]
pub fn is_debug_build(&self) -> bool
[src]
pub fn is_in_low_processor_usage_mode(&self) -> bool
[src]
pub fn is_keep_screen_on(&self) -> bool
[src]
pub fn is_ok_left_and_cancel_right(&self) -> bool
[src]
pub fn is_scancode_unicode(&self, code: i64) -> bool
[src]
pub fn is_stdout_verbose(&self) -> bool
[src]
pub fn is_userfs_persistent(&self) -> bool
[src]
pub fn is_vsync_enabled(&self) -> bool
[src]
pub fn is_vsync_via_compositor_enabled(&self) -> bool
[src]
pub fn is_window_always_on_top(&self) -> bool
[src]
pub fn is_window_focused(&self) -> bool
[src]
pub fn is_window_fullscreen(&self) -> bool
[src]
pub fn is_window_maximized(&self) -> bool
[src]
pub fn is_window_minimized(&self) -> bool
[src]
pub fn is_window_resizable(&self) -> bool
[src]
pub fn kill(&mut self, pid: i64) -> Result<(), GodotError>
[src]
pub fn move_window_to_foreground(&mut self)
[src]
pub fn native_video_is_playing(&mut self) -> bool
[src]
pub fn native_video_pause(&mut self)
[src]
pub fn native_video_play(
&mut self,
path: GodotString,
volume: f64,
audio_track: GodotString,
subtitle_track: GodotString
) -> Result<(), GodotError>
[src]
&mut self,
path: GodotString,
volume: f64,
audio_track: GodotString,
subtitle_track: GodotString
) -> Result<(), GodotError>
pub fn native_video_stop(&mut self)
[src]
pub fn native_video_unpause(&mut self)
[src]
pub fn open_midi_inputs(&mut self)
[src]
pub fn print_all_resources(&mut self, tofile: GodotString)
[src]
pub fn print_all_textures_by_size(&mut self)
[src]
pub fn print_resources_by_type(&mut self, types: StringArray)
[src]
pub fn print_resources_in_use(&mut self, short: bool)
[src]
pub fn request_attention(&mut self)
[src]
pub fn request_permission(&mut self, name: GodotString) -> bool
[src]
pub fn request_permissions(&mut self) -> bool
[src]
pub fn set_borderless_window(&mut self, borderless: bool)
[src]
pub fn set_clipboard(&mut self, clipboard: GodotString)
[src]
pub fn set_current_screen(&mut self, screen: i64)
[src]
pub fn set_exit_code(&mut self, code: i64)
[src]
pub fn set_icon(&mut self, icon: Option<Image>)
[src]
pub fn set_ime_active(&mut self, active: bool)
[src]
pub fn set_ime_position(&mut self, position: Vector2D<f32, UnknownUnit>)
[src]
pub fn set_keep_screen_on(&mut self, enabled: bool)
[src]
pub fn set_low_processor_usage_mode(&mut self, enable: bool)
[src]
pub fn set_low_processor_usage_mode_sleep_usec(&mut self, usec: i64)
[src]
pub fn set_max_window_size(&mut self, size: Vector2D<f32, UnknownUnit>)
[src]
pub fn set_min_window_size(&mut self, size: Vector2D<f32, UnknownUnit>)
[src]
pub fn set_native_icon(&mut self, filename: GodotString)
[src]
pub fn set_screen_orientation(&mut self, orientation: i64)
[src]
pub fn set_thread_name(&mut self, name: GodotString) -> Result<(), GodotError>
[src]
pub fn set_use_file_access_save_and_swap(&mut self, enabled: bool)
[src]
pub fn set_use_vsync(&mut self, enable: bool)
[src]
pub fn set_vsync_via_compositor(&mut self, enable: bool)
[src]
pub fn set_window_always_on_top(&mut self, enabled: bool)
[src]
pub fn set_window_fullscreen(&mut self, enabled: bool)
[src]
pub fn set_window_maximized(&mut self, enabled: bool)
[src]
pub fn set_window_minimized(&mut self, enabled: bool)
[src]
pub fn set_window_per_pixel_transparency_enabled(&mut self, enabled: bool)
[src]
pub fn set_window_position(&mut self, position: Vector2D<f32, UnknownUnit>)
[src]
pub fn set_window_resizable(&mut self, enabled: bool)
[src]
pub fn set_window_size(&mut self, size: Vector2D<f32, UnknownUnit>)
[src]
pub fn set_window_title(&mut self, title: GodotString)
[src]
pub fn shell_open(&mut self, uri: GodotString) -> Result<(), GodotError>
[src]
pub fn show_virtual_keyboard(&mut self, existing_text: GodotString)
[src]
pub fn to_object(&self) -> Object
[src]
Up-cast.
pub fn cast<T>(&self) -> Option<T> where
T: GodotObject,
[src]
T: GodotObject,
Generic dynamic cast.
Methods from Deref<Target = Object>
pub const NOTIFICATION_POSTINITIALIZE: i64
[src]
pub const CONNECT_PERSIST: i64
[src]
pub const CONNECT_DEFERRED: i64
[src]
pub const NOTIFICATION_PREDELETE: i64
[src]
pub const CONNECT_REFERENCE_COUNTED: i64
[src]
pub const CONNECT_ONESHOT: i64
[src]
pub unsafe fn _get(&mut self, property: GodotString) -> Variant
[src]
pub unsafe fn _get_property_list(&mut self) -> VariantArray
[src]
pub unsafe fn _init(&mut self)
[src]
pub unsafe fn _notification(&mut self, what: i64)
[src]
pub unsafe fn _set(&mut self, property: GodotString, value: Variant) -> bool
[src]
pub unsafe fn _to_string(&mut self) -> GodotString
[src]
pub unsafe fn add_user_signal(
&mut self,
signal: GodotString,
arguments: VariantArray
)
[src]
&mut self,
signal: GodotString,
arguments: VariantArray
)
pub unsafe fn call(
&mut self,
method: GodotString,
varargs: &[Variant]
) -> Variant
[src]
&mut self,
method: GodotString,
varargs: &[Variant]
) -> Variant
pub unsafe fn call_deferred(
&mut self,
method: GodotString,
varargs: &[Variant]
) -> Variant
[src]
&mut self,
method: GodotString,
varargs: &[Variant]
) -> Variant
pub unsafe fn callv(
&mut self,
method: GodotString,
arg_array: VariantArray
) -> Variant
[src]
&mut self,
method: GodotString,
arg_array: VariantArray
) -> Variant
pub unsafe fn can_translate_messages(&self) -> bool
[src]
pub unsafe fn connect(
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString,
binds: VariantArray,
flags: i64
) -> Result<(), GodotError>
[src]
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString,
binds: VariantArray,
flags: i64
) -> Result<(), GodotError>
pub unsafe fn disconnect(
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString
)
[src]
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString
)
pub unsafe fn emit_signal(
&mut self,
signal: GodotString,
varargs: &[Variant]
) -> Variant
[src]
&mut self,
signal: GodotString,
varargs: &[Variant]
) -> Variant
pub unsafe fn get(&self, property: GodotString) -> Variant
[src]
pub unsafe fn get_class(&self) -> GodotString
[src]
pub unsafe fn get_incoming_connections(&self) -> VariantArray
[src]
pub unsafe fn get_indexed(&self, property: NodePath) -> Variant
[src]
pub unsafe fn get_instance_id(&self) -> i64
[src]
pub unsafe fn get_meta(&self, name: GodotString) -> Variant
[src]
pub unsafe fn get_meta_list(&self) -> StringArray
[src]
pub unsafe fn get_method_list(&self) -> VariantArray
[src]
pub unsafe fn get_property_list(&self) -> VariantArray
[src]
pub unsafe fn get_script(&self) -> Option<Reference>
[src]
pub unsafe fn get_signal_connection_list(
&self,
signal: GodotString
) -> VariantArray
[src]
&self,
signal: GodotString
) -> VariantArray
pub unsafe fn get_signal_list(&self) -> VariantArray
[src]
pub unsafe fn has_meta(&self, name: GodotString) -> bool
[src]
pub unsafe fn has_method(&self, method: GodotString) -> bool
[src]
pub unsafe fn has_user_signal(&self, signal: GodotString) -> bool
[src]
pub unsafe fn is_blocking_signals(&self) -> bool
[src]
pub unsafe fn is_class(&self, class: GodotString) -> bool
[src]
pub unsafe fn is_connected(
&self,
signal: GodotString,
target: Option<Object>,
method: GodotString
) -> bool
[src]
&self,
signal: GodotString,
target: Option<Object>,
method: GodotString
) -> bool
pub unsafe fn is_queued_for_deletion(&self) -> bool
[src]
pub unsafe fn notification(&mut self, what: i64, reversed: bool)
[src]
pub unsafe fn property_list_changed_notify(&mut self)
[src]
pub unsafe fn remove_meta(&mut self, name: GodotString)
[src]
pub unsafe fn set(&mut self, property: GodotString, value: Variant)
[src]
pub unsafe fn set_block_signals(&mut self, enable: bool)
[src]
pub unsafe fn set_deferred(&mut self, property: GodotString, value: Variant)
[src]
pub unsafe fn set_indexed(&mut self, property: NodePath, value: Variant)
[src]
pub unsafe fn set_message_translation(&mut self, enable: bool)
[src]
pub unsafe fn set_meta(&mut self, name: GodotString, value: Variant)
[src]
pub unsafe fn set_script(&mut self, script: Option<Reference>)
[src]
pub unsafe fn to_string(&mut self) -> GodotString
[src]
pub unsafe fn tr(&self, message: GodotString) -> GodotString
[src]
pub unsafe fn cast<T>(&self) -> Option<T> where
T: GodotObject,
[src]
T: GodotObject,
Generic dynamic cast.
Trait Implementations
impl Clone for OS
[src]
impl Copy for OS
[src]
impl Debug for OS
[src]
impl Deref for OS
[src]
impl DerefMut for OS
[src]
impl FromVariant for OS
[src]
fn from_variant(variant: &Variant) -> Result<OS, FromVariantError>
[src]
impl GodotObject for OS
[src]
fn class_name() -> &'static str
[src]
unsafe fn from_sys(obj: *mut c_void) -> OS
[src]
unsafe fn from_return_position_sys(obj: *mut c_void) -> OS
[src]
unsafe fn to_sys(&self) -> *mut c_void
[src]
impl ToVariant for OS
[src]
fn to_variant(&self) -> Variant
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Export for T where
T: GodotObject + ToVariant,
[src]
T: GodotObject + ToVariant,
type Hint = ()
A type-specific hint type that is valid for the type being exported.
fn export_info(_hint: Option<<T as Export>::Hint>) -> ExportInfo
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,