Struct godot::classes::DisplayServer

#[repr(C)]
pub struct DisplayServer { /* private fields */ }
Expand description

Godot class DisplayServer.

Inherits Object.

Related symbols:

See also Godot docs for DisplayServer.

§Singleton

This class is a singleton. You can get the one instance using DisplayServer::singleton().

Implementations§

§

impl DisplayServer

pub fn singleton() -> Gd<DisplayServer>

pub fn has_feature(&self, feature: Feature) -> bool

pub fn get_name(&self) -> GString

pub fn help_set_search_callbacks( &mut self, search_callback: Callable, action_callback: Callable, )

pub fn global_menu_set_popup_callbacks( &mut self, menu_root: GString, open_callback: Callable, close_callback: Callable, )

pub fn global_menu_add_submenu_item( &mut self, menu_root: GString, label: GString, submenu: GString, ) -> i32

pub fn global_menu_add_submenu_item_ex( &mut self, menu_root: GString, label: GString, submenu: GString, ) -> ExGlobalMenuAddSubmenuItem<'_>

pub fn global_menu_add_item( &mut self, menu_root: GString, label: GString, ) -> i32

pub fn global_menu_add_item_ex( &mut self, menu_root: GString, label: GString, ) -> ExGlobalMenuAddItem<'_>

pub fn global_menu_add_check_item( &mut self, menu_root: GString, label: GString, ) -> i32

pub fn global_menu_add_check_item_ex( &mut self, menu_root: GString, label: GString, ) -> ExGlobalMenuAddCheckItem<'_>

pub fn global_menu_add_icon_item( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> i32

pub fn global_menu_add_icon_item_ex( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> ExGlobalMenuAddIconItem<'_>

pub fn global_menu_add_icon_check_item( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> i32

pub fn global_menu_add_icon_check_item_ex( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> ExGlobalMenuAddIconCheckItem<'_>

pub fn global_menu_add_radio_check_item( &mut self, menu_root: GString, label: GString, ) -> i32

pub fn global_menu_add_radio_check_item_ex( &mut self, menu_root: GString, label: GString, ) -> ExGlobalMenuAddRadioCheckItem<'_>

pub fn global_menu_add_icon_radio_check_item( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> i32

pub fn global_menu_add_icon_radio_check_item_ex( &mut self, menu_root: GString, icon: Gd<Texture2D>, label: GString, ) -> ExGlobalMenuAddIconRadioCheckItem<'_>

pub fn global_menu_add_multistate_item( &mut self, menu_root: GString, label: GString, max_states: i32, default_state: i32, ) -> i32

pub fn global_menu_add_multistate_item_ex( &mut self, menu_root: GString, label: GString, max_states: i32, default_state: i32, ) -> ExGlobalMenuAddMultistateItem<'_>

pub fn global_menu_add_separator(&mut self, menu_root: GString) -> i32

pub fn global_menu_add_separator_ex( &mut self, menu_root: GString, ) -> ExGlobalMenuAddSeparator<'_>

pub fn global_menu_get_item_index_from_text( &self, menu_root: GString, text: GString, ) -> i32

pub fn global_menu_get_item_index_from_tag( &self, menu_root: GString, tag: Variant, ) -> i32

pub fn global_menu_is_item_checked(&self, menu_root: GString, idx: i32) -> bool

pub fn global_menu_is_item_checkable( &self, menu_root: GString, idx: i32, ) -> bool

pub fn global_menu_is_item_radio_checkable( &self, menu_root: GString, idx: i32, ) -> bool

pub fn global_menu_get_item_callback( &self, menu_root: GString, idx: i32, ) -> Callable

pub fn global_menu_get_item_key_callback( &self, menu_root: GString, idx: i32, ) -> Callable

pub fn global_menu_get_item_tag(&self, menu_root: GString, idx: i32) -> Variant

pub fn global_menu_get_item_text(&self, menu_root: GString, idx: i32) -> GString

pub fn global_menu_get_item_submenu( &self, menu_root: GString, idx: i32, ) -> GString

pub fn global_menu_get_item_accelerator( &self, menu_root: GString, idx: i32, ) -> Key

pub fn global_menu_is_item_disabled(&self, menu_root: GString, idx: i32) -> bool

pub fn global_menu_is_item_hidden(&self, menu_root: GString, idx: i32) -> bool

pub fn global_menu_get_item_tooltip( &self, menu_root: GString, idx: i32, ) -> GString

pub fn global_menu_get_item_state(&self, menu_root: GString, idx: i32) -> i32

pub fn global_menu_get_item_max_states( &self, menu_root: GString, idx: i32, ) -> i32

pub fn global_menu_get_item_icon( &self, menu_root: GString, idx: i32, ) -> Option<Gd<Texture2D>>

pub fn global_menu_get_item_indentation_level( &self, menu_root: GString, idx: i32, ) -> i32

pub fn global_menu_set_item_checked( &mut self, menu_root: GString, idx: i32, checked: bool, )

pub fn global_menu_set_item_checkable( &mut self, menu_root: GString, idx: i32, checkable: bool, )

pub fn global_menu_set_item_radio_checkable( &mut self, menu_root: GString, idx: i32, checkable: bool, )

pub fn global_menu_set_item_callback( &mut self, menu_root: GString, idx: i32, callback: Callable, )

pub fn global_menu_set_item_hover_callbacks( &mut self, menu_root: GString, idx: i32, callback: Callable, )

pub fn global_menu_set_item_key_callback( &mut self, menu_root: GString, idx: i32, key_callback: Callable, )

pub fn global_menu_set_item_tag( &mut self, menu_root: GString, idx: i32, tag: Variant, )

pub fn global_menu_set_item_text( &mut self, menu_root: GString, idx: i32, text: GString, )

pub fn global_menu_set_item_submenu( &mut self, menu_root: GString, idx: i32, submenu: GString, )

pub fn global_menu_set_item_accelerator( &mut self, menu_root: GString, idx: i32, keycode: Key, )

pub fn global_menu_set_item_disabled( &mut self, menu_root: GString, idx: i32, disabled: bool, )

pub fn global_menu_set_item_hidden( &mut self, menu_root: GString, idx: i32, hidden: bool, )

pub fn global_menu_set_item_tooltip( &mut self, menu_root: GString, idx: i32, tooltip: GString, )

pub fn global_menu_set_item_state( &mut self, menu_root: GString, idx: i32, state: i32, )

pub fn global_menu_set_item_max_states( &mut self, menu_root: GString, idx: i32, max_states: i32, )

pub fn global_menu_set_item_icon( &mut self, menu_root: GString, idx: i32, icon: Gd<Texture2D>, )

pub fn global_menu_set_item_indentation_level( &mut self, menu_root: GString, idx: i32, level: i32, )

pub fn global_menu_get_item_count(&self, menu_root: GString) -> i32

pub fn global_menu_remove_item(&mut self, menu_root: GString, idx: i32)

pub fn global_menu_clear(&mut self, menu_root: GString)

pub fn global_menu_get_system_menu_roots(&self) -> Dictionary

pub fn tts_is_speaking(&self) -> bool

pub fn tts_is_paused(&self) -> bool

pub fn tts_get_voices(&self) -> Array<Dictionary>

pub fn tts_get_voices_for_language( &self, language: GString, ) -> PackedStringArray

pub fn tts_speak(&mut self, text: GString, voice: GString)

pub fn tts_speak_ex(&mut self, text: GString, voice: GString) -> ExTtsSpeak<'_>

pub fn tts_pause(&mut self)

pub fn tts_resume(&mut self)

pub fn tts_stop(&mut self)

pub fn tts_set_utterance_callback( &mut self, event: TtsUtteranceEvent, callable: Callable, )

pub fn is_dark_mode_supported(&self) -> bool

pub fn is_dark_mode(&self) -> bool

pub fn get_accent_color(&self) -> Color

pub fn get_base_color(&self) -> Color

pub fn set_system_theme_change_callback(&mut self, callable: Callable)

pub fn mouse_set_mode(&mut self, mouse_mode: MouseMode)

pub fn mouse_get_mode(&self) -> MouseMode

pub fn warp_mouse(&mut self, position: Vector2i)

pub fn mouse_get_position(&self) -> Vector2i

pub fn mouse_get_button_state(&self) -> MouseButtonMask

pub fn clipboard_set(&mut self, clipboard: GString)

pub fn clipboard_get(&self) -> GString

pub fn clipboard_get_image(&self) -> Option<Gd<Image>>

pub fn clipboard_has(&self) -> bool

pub fn clipboard_has_image(&self) -> bool

pub fn clipboard_set_primary(&mut self, clipboard_primary: GString)

pub fn clipboard_get_primary(&self) -> GString

pub fn get_display_cutouts(&self) -> Array<Rect2>

pub fn get_display_safe_area(&self) -> Rect2i

pub fn get_screen_count(&self) -> i32

pub fn get_primary_screen(&self) -> i32

pub fn get_keyboard_focus_screen(&self) -> i32

pub fn get_screen_from_rect(&self, rect: Rect2) -> i32

pub fn screen_get_position(&self) -> Vector2i

pub fn screen_get_position_ex(&self) -> ExScreenGetPosition<'_>

pub fn screen_get_size(&self) -> Vector2i

pub fn screen_get_size_ex(&self) -> ExScreenGetSize<'_>

pub fn screen_get_usable_rect(&self) -> Rect2i

pub fn screen_get_usable_rect_ex(&self) -> ExScreenGetUsableRect<'_>

pub fn screen_get_dpi(&self) -> i32

pub fn screen_get_dpi_ex(&self) -> ExScreenGetDpi<'_>

pub fn screen_get_scale(&self) -> f32

pub fn screen_get_scale_ex(&self) -> ExScreenGetScale<'_>

pub fn is_touchscreen_available(&self) -> bool

pub fn screen_get_max_scale(&self) -> f32

pub fn screen_get_refresh_rate(&self) -> f32

pub fn screen_get_refresh_rate_ex(&self) -> ExScreenGetRefreshRate<'_>

pub fn screen_get_pixel(&self, position: Vector2i) -> Color

pub fn screen_get_image(&self) -> Option<Gd<Image>>

pub fn screen_get_image_ex(&self) -> ExScreenGetImage<'_>

pub fn screen_set_orientation(&mut self, orientation: ScreenOrientation)

pub fn screen_set_orientation_ex( &mut self, orientation: ScreenOrientation, ) -> ExScreenSetOrientation<'_>

pub fn screen_get_orientation(&self) -> ScreenOrientation

pub fn screen_get_orientation_ex(&self) -> ExScreenGetOrientation<'_>

pub fn screen_set_keep_on(&mut self, enable: bool)

pub fn screen_is_kept_on(&self) -> bool

pub fn get_window_list(&self) -> PackedInt32Array

pub fn get_window_at_screen_position(&self, position: Vector2i) -> i32

pub fn window_get_native_handle(&self, handle_type: HandleType) -> i64

pub fn window_get_native_handle_ex( &self, handle_type: HandleType, ) -> ExWindowGetNativeHandle<'_>

pub fn window_get_active_popup(&self) -> i32

pub fn window_set_popup_safe_rect(&mut self, window: i32, rect: Rect2i)

pub fn window_get_popup_safe_rect(&self, window: i32) -> Rect2i

pub fn window_set_title(&mut self, title: GString)

pub fn window_set_title_ex(&mut self, title: GString) -> ExWindowSetTitle<'_>

pub fn window_get_title_size(&self, title: GString) -> Vector2i

pub fn window_get_title_size_ex( &self, title: GString, ) -> ExWindowGetTitleSize<'_>

pub fn window_set_mouse_passthrough(&mut self, region: PackedVector2Array)

pub fn window_set_mouse_passthrough_ex( &mut self, region: PackedVector2Array, ) -> ExWindowSetMousePassthrough<'_>

pub fn window_get_current_screen(&self) -> i32

pub fn window_get_current_screen_ex(&self) -> ExWindowGetCurrentScreen<'_>

pub fn window_set_current_screen(&mut self, screen: i32)

pub fn window_set_current_screen_ex( &mut self, screen: i32, ) -> ExWindowSetCurrentScreen<'_>

pub fn window_get_position(&self) -> Vector2i

pub fn window_get_position_ex(&self) -> ExWindowGetPosition<'_>

pub fn window_get_position_with_decorations(&self) -> Vector2i

pub fn window_get_position_with_decorations_ex( &self, ) -> ExWindowGetPositionWithDecorations<'_>

pub fn window_set_position(&mut self, position: Vector2i)

pub fn window_set_position_ex( &mut self, position: Vector2i, ) -> ExWindowSetPosition<'_>

pub fn window_get_size(&self) -> Vector2i

pub fn window_get_size_ex(&self) -> ExWindowGetSize<'_>

pub fn window_set_size(&mut self, size: Vector2i)

pub fn window_set_size_ex(&mut self, size: Vector2i) -> ExWindowSetSize<'_>

pub fn window_set_rect_changed_callback(&mut self, callback: Callable)

pub fn window_set_rect_changed_callback_ex( &mut self, callback: Callable, ) -> ExWindowSetRectChangedCallback<'_>

pub fn window_set_window_event_callback(&mut self, callback: Callable)

pub fn window_set_window_event_callback_ex( &mut self, callback: Callable, ) -> ExWindowSetWindowEventCallback<'_>

pub fn window_set_input_event_callback(&mut self, callback: Callable)

pub fn window_set_input_event_callback_ex( &mut self, callback: Callable, ) -> ExWindowSetInputEventCallback<'_>

pub fn window_set_input_text_callback(&mut self, callback: Callable)

pub fn window_set_input_text_callback_ex( &mut self, callback: Callable, ) -> ExWindowSetInputTextCallback<'_>

pub fn window_set_drop_files_callback(&mut self, callback: Callable)

pub fn window_set_drop_files_callback_ex( &mut self, callback: Callable, ) -> ExWindowSetDropFilesCallback<'_>

pub fn window_get_attached_instance_id(&self) -> u64

pub fn window_get_attached_instance_id_ex( &self, ) -> ExWindowGetAttachedInstanceId<'_>

pub fn window_get_max_size(&self) -> Vector2i

pub fn window_get_max_size_ex(&self) -> ExWindowGetMaxSize<'_>

pub fn window_set_max_size(&mut self, max_size: Vector2i)

pub fn window_set_max_size_ex( &mut self, max_size: Vector2i, ) -> ExWindowSetMaxSize<'_>

pub fn window_get_min_size(&self) -> Vector2i

pub fn window_get_min_size_ex(&self) -> ExWindowGetMinSize<'_>

pub fn window_set_min_size(&mut self, min_size: Vector2i)

pub fn window_set_min_size_ex( &mut self, min_size: Vector2i, ) -> ExWindowSetMinSize<'_>

pub fn window_get_size_with_decorations(&self) -> Vector2i

pub fn window_get_size_with_decorations_ex( &self, ) -> ExWindowGetSizeWithDecorations<'_>

pub fn window_get_mode(&self) -> WindowMode

pub fn window_get_mode_ex(&self) -> ExWindowGetMode<'_>

pub fn window_set_mode(&mut self, mode: WindowMode)

pub fn window_set_mode_ex(&mut self, mode: WindowMode) -> ExWindowSetMode<'_>

pub fn window_set_flag(&mut self, flag: WindowFlags, enabled: bool)

pub fn window_set_flag_ex( &mut self, flag: WindowFlags, enabled: bool, ) -> ExWindowSetFlag<'_>

pub fn window_get_flag(&self, flag: WindowFlags) -> bool

pub fn window_get_flag_ex(&self, flag: WindowFlags) -> ExWindowGetFlag<'_>

pub fn window_set_window_buttons_offset(&mut self, offset: Vector2i)

pub fn window_set_window_buttons_offset_ex( &mut self, offset: Vector2i, ) -> ExWindowSetWindowButtonsOffset<'_>

pub fn window_get_safe_title_margins(&self) -> Vector3i

pub fn window_get_safe_title_margins_ex( &self, ) -> ExWindowGetSafeTitleMargins<'_>

pub fn window_request_attention(&mut self)

pub fn window_request_attention_ex(&mut self) -> ExWindowRequestAttention<'_>

pub fn window_move_to_foreground(&mut self)

pub fn window_move_to_foreground_ex(&mut self) -> ExWindowMoveToForeground<'_>

pub fn window_is_focused(&self) -> bool

pub fn window_is_focused_ex(&self) -> ExWindowIsFocused<'_>

pub fn window_can_draw(&self) -> bool

pub fn window_can_draw_ex(&self) -> ExWindowCanDraw<'_>

pub fn window_set_transient(&mut self, window_id: i32, parent_window_id: i32)

pub fn window_set_exclusive(&mut self, window_id: i32, exclusive: bool)

pub fn window_set_ime_active(&mut self, active: bool)

pub fn window_set_ime_active_ex( &mut self, active: bool, ) -> ExWindowSetImeActive<'_>

pub fn window_set_ime_position(&mut self, position: Vector2i)

pub fn window_set_ime_position_ex( &mut self, position: Vector2i, ) -> ExWindowSetImePosition<'_>

pub fn window_set_vsync_mode(&mut self, vsync_mode: VSyncMode)

pub fn window_set_vsync_mode_ex( &mut self, vsync_mode: VSyncMode, ) -> ExWindowSetVSyncMode<'_>

pub fn window_get_vsync_mode(&self) -> VSyncMode

pub fn window_get_vsync_mode_ex(&self) -> ExWindowGetVSyncMode<'_>

pub fn window_is_maximize_allowed(&self) -> bool

pub fn window_is_maximize_allowed_ex(&self) -> ExWindowIsMaximizeAllowed<'_>

pub fn window_maximize_on_title_dbl_click(&self) -> bool

pub fn window_minimize_on_title_dbl_click(&self) -> bool

pub fn ime_get_selection(&self) -> Vector2i

pub fn ime_get_text(&self) -> GString

pub fn virtual_keyboard_show(&mut self, existing_text: GString)

pub fn virtual_keyboard_show_ex( &mut self, existing_text: GString, ) -> ExVirtualKeyboardShow<'_>

pub fn virtual_keyboard_hide(&mut self)

pub fn virtual_keyboard_get_height(&self) -> i32

pub fn cursor_set_shape(&mut self, shape: CursorShape)

pub fn cursor_get_shape(&self) -> CursorShape

pub fn cursor_set_custom_image(&mut self, cursor: Gd<Resource>)

pub fn cursor_set_custom_image_ex( &mut self, cursor: Gd<Resource>, ) -> ExCursorSetCustomImage<'_>

pub fn get_swap_cancel_ok(&mut self) -> bool

pub fn enable_for_stealing_focus(&mut self, process_id: i64)

pub fn dialog_show( &mut self, title: GString, description: GString, buttons: PackedStringArray, callback: Callable, ) -> Error

pub fn dialog_input_text( &mut self, title: GString, description: GString, existing_text: GString, callback: Callable, ) -> Error

pub fn file_dialog_show( &mut self, title: GString, current_directory: GString, filename: GString, show_hidden: bool, mode: FileDialogMode, filters: PackedStringArray, callback: Callable, ) -> Error

pub fn file_dialog_with_options_show( &mut self, title: GString, current_directory: GString, root: GString, filename: GString, show_hidden: bool, mode: FileDialogMode, filters: PackedStringArray, options: Array<Dictionary>, callback: Callable, ) -> Error

pub fn keyboard_get_layout_count(&self) -> i32

pub fn keyboard_get_current_layout(&self) -> i32

pub fn keyboard_set_current_layout(&mut self, index: i32)

pub fn keyboard_get_layout_language(&self, index: i32) -> GString

pub fn keyboard_get_layout_name(&self, index: i32) -> GString

pub fn keyboard_get_keycode_from_physical(&self, keycode: Key) -> Key

pub fn keyboard_get_label_from_physical(&self, keycode: Key) -> Key

pub fn process_events(&mut self)

pub fn force_process_and_drop_events(&mut self)

pub fn set_native_icon(&mut self, filename: GString)

pub fn set_icon(&mut self, image: Gd<Image>)

pub fn create_status_indicator( &mut self, icon: Gd<Texture2D>, tooltip: GString, callback: Callable, ) -> i32

pub fn status_indicator_set_icon(&mut self, id: i32, icon: Gd<Texture2D>)

pub fn status_indicator_set_tooltip(&mut self, id: i32, tooltip: GString)

pub fn status_indicator_set_menu(&mut self, id: i32, menu_rid: Rid)

pub fn status_indicator_set_callback(&mut self, id: i32, callback: Callable)

pub fn status_indicator_get_rect(&self, id: i32) -> Rect2

pub fn delete_status_indicator(&mut self, id: i32)

pub fn tablet_get_driver_count(&self) -> i32

pub fn tablet_get_driver_name(&self, idx: i32) -> GString

pub fn tablet_get_current_driver(&self) -> GString

pub fn tablet_set_current_driver(&mut self, name: GString)

pub fn is_window_transparency_available(&self) -> bool

pub fn register_additional_output(&mut self, object: Gd<Object>)

pub fn unregister_additional_output(&mut self, object: Gd<Object>)

pub fn has_additional_outputs(&self) -> bool

pub const SCREEN_WITH_MOUSE_FOCUS: i32 = -4i32

pub const SCREEN_WITH_KEYBOARD_FOCUS: i32 = -3i32

pub const SCREEN_PRIMARY: i32 = -2i32

pub const SCREEN_OF_MAIN_WINDOW: i32 = -1i32

pub const MAIN_WINDOW_ID: i32 = 0i32

pub const INVALID_WINDOW_ID: i32 = -1i32

pub const INVALID_INDICATOR_ID: i32 = -1i32

Methods from Deref<Target = Object>§

pub fn get_class(&self) -> GString

pub fn is_class(&self, class: GString) -> bool

pub fn set(&mut self, property: StringName, value: Variant)

pub fn get(&self, property: StringName) -> Variant

pub fn set_indexed(&mut self, property_path: NodePath, value: Variant)

pub fn get_indexed(&self, property_path: NodePath) -> Variant

pub fn get_property_list(&self) -> Array<Dictionary>

pub fn get_method_list(&self) -> Array<Dictionary>

pub fn property_can_revert(&self, property: StringName) -> bool

pub fn property_get_revert(&self, property: StringName) -> Variant

pub fn set_script(&mut self, script: Variant)

pub fn get_script(&self) -> Variant

pub fn set_meta(&mut self, name: StringName, value: Variant)

pub fn remove_meta(&mut self, name: StringName)

pub fn get_meta(&self, name: StringName) -> Variant

pub fn get_meta_ex(&self, name: StringName) -> ExGetMeta<'_>

pub fn has_meta(&self, name: StringName) -> bool

pub fn get_meta_list(&self) -> Array<StringName>

pub fn add_user_signal(&mut self, signal: GString)

pub fn add_user_signal_ex(&mut self, signal: GString) -> ExAddUserSignal<'_>

pub fn has_user_signal(&self, signal: StringName) -> bool

pub fn remove_user_signal(&mut self, signal: StringName)

pub fn emit_signal(&mut self, signal: StringName, varargs: &[Variant]) -> Error

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_emit_signal( &mut self, signal: StringName, varargs: &[Variant], ) -> Result<Error, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call(&mut self, method: StringName, varargs: &[Variant]) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Variant

§Panics

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will panic in such a case.

pub fn try_call_deferred( &mut self, method: StringName, varargs: &[Variant], ) -> Result<Variant, CallError>

§Return type

This is a varcall method, meaning parameters and return values are passed as Variant. It can detect call failures and will return Err in such a case.

pub fn set_deferred(&mut self, property: StringName, value: Variant)

pub fn callv(&mut self, method: StringName, arg_array: OutArray) -> Variant

pub fn has_method(&self, method: StringName) -> bool

pub fn get_method_argument_count(&self, method: StringName) -> i32

pub fn has_signal(&self, signal: StringName) -> bool

pub fn get_signal_list(&self) -> Array<Dictionary>

pub fn get_signal_connection_list( &self, signal: StringName, ) -> Array<Dictionary>

pub fn get_incoming_connections(&self) -> Array<Dictionary>

pub fn connect(&mut self, signal: StringName, callable: Callable) -> Error

pub fn connect_ex( &mut self, signal: StringName, callable: Callable, ) -> ExConnect<'_>

pub fn disconnect(&mut self, signal: StringName, callable: Callable)

pub fn is_connected(&self, signal: StringName, callable: Callable) -> bool

pub fn set_block_signals(&mut self, enable: bool)

pub fn is_blocking_signals(&self) -> bool

pub fn notify_property_list_changed(&mut self)

pub fn set_message_translation(&mut self, enable: bool)

pub fn can_translate_messages(&self) -> bool

pub fn tr(&self, message: StringName) -> GString

pub fn tr_ex(&self, message: StringName) -> ExTr<'_>

pub fn tr_n( &self, message: StringName, plural_message: StringName, n: i32, ) -> GString

pub fn tr_n_ex( &self, message: StringName, plural_message: StringName, n: i32, ) -> ExTrN<'_>

pub fn is_queued_for_deletion(&self) -> bool

pub fn cancel_free(&mut self)

pub fn notify(&mut self, what: ObjectNotification)

⚠️ Sends a Godot notification to all classes inherited by the object.

Triggers calls to on_notification(), and depending on the notification, also to Godot’s lifecycle callbacks such as ready().

Starts from the highest ancestor (the Object class) and goes down the hierarchy. See also Godot docs for Object::notification().

§Panics

If you call this method on a user-defined object while holding a GdRef or GdMut guard on the instance, you will encounter a panic. The reason is that the receiving virtual method on_notification() acquires a GdMut lock dynamically, which must be exclusive.

pub fn notify_reversed(&mut self, what: ObjectNotification)

⚠️ Like Self::notify(), but starts at the most-derived class and goes up the hierarchy.

See docs of that method, including the panics.

Trait Implementations§

§

impl Bounds for DisplayServer

§

type Memory = MemManual

Defines the memory strategy of the static type.
§

type Declarer = DeclEngine

Whether this class is a core Godot class provided by the engine, or declared by the user as a Rust struct.
§

impl Debug for DisplayServer

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for DisplayServer

§

type Target = Object

The resulting type after dereferencing.
§

fn deref(&self) -> &<DisplayServer as Deref>::Target

Dereferences the value.
§

impl DerefMut for DisplayServer

§

fn deref_mut(&mut self) -> &mut <DisplayServer as Deref>::Target

Mutably dereferences the value.
§

impl GodotClass for DisplayServer

§

type Base = Object

The immediate superclass of T. This is always a Godot engine class.
§

fn class_name() -> ClassName

The name of the class, under which it is registered in Godot. Read more
§

const INIT_LEVEL: InitLevel = crate::init::InitLevel::Scene

Initialization level, during which this class should be initialized with Godot. Read more
§

fn inherits<U>() -> bool
where U: GodotClass,

Returns whether Self inherits from U. Read more
§

impl Inherits<Object> for DisplayServer

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Inherits<T> for T
where T: GodotClass,