Struct Window

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

Godot class Window.

Inherits Viewport.

Related symbols:

See also Godot docs for Window.

§Construction

This class is manually managed. You can create a new instance using Window::new_alloc().

Do not forget to call free() or hand over ownership to Godot.

Implementations§

Source§

impl Window

Source

pub fn set_title(&mut self, title: impl AsArg<GString>)

Source

pub fn get_title(&self) -> GString

Source

pub fn get_window_id(&self) -> i32

Source

pub fn set_initial_position(&mut self, initial_position: WindowInitialPosition)

Source

pub fn get_initial_position(&self) -> WindowInitialPosition

Source

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

Source

pub fn get_current_screen(&self) -> i32

Source

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

Source

pub fn get_position(&self) -> Vector2i

Source

pub fn move_to_center(&mut self)

Source

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

Source

pub fn get_size(&self) -> Vector2i

Source

pub fn reset_size(&mut self)

Source

pub fn get_position_with_decorations(&self) -> Vector2i

Source

pub fn get_size_with_decorations(&self) -> Vector2i

Source

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

Source

pub fn get_max_size(&self) -> Vector2i

Source

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

Source

pub fn get_min_size(&self) -> Vector2i

Source

pub fn set_mode(&mut self, mode: Mode)

Source

pub fn get_mode(&self) -> Mode

Source

pub fn set_flag(&mut self, flag: Flags, enabled: bool)

Source

pub fn get_flag(&self, flag: Flags) -> bool

Source

pub fn is_maximize_allowed(&self) -> bool

Source

pub fn request_attention(&mut self)

Source

pub fn move_to_foreground(&mut self)

Source

pub fn set_visible(&mut self, visible: bool)

Source

pub fn is_visible(&self) -> bool

Source

pub fn hide(&mut self)

Source

pub fn show(&mut self)

Source

pub fn set_transient(&mut self, transient: bool)

Source

pub fn is_transient(&self) -> bool

Source

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

Source

pub fn is_transient_to_focused(&self) -> bool

Source

pub fn set_exclusive(&mut self, exclusive: bool)

Source

pub fn is_exclusive(&self) -> bool

Source

pub fn set_unparent_when_invisible(&mut self, unparent: bool)

Source

pub fn can_draw(&self) -> bool

Source

pub fn has_focus(&self) -> bool

Source

pub fn grab_focus(&mut self)

Source

pub fn start_drag(&mut self)

Source

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

Source

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

Source

pub fn is_embedded(&self) -> bool

Source

pub fn get_contents_minimum_size(&self) -> Vector2

Source

pub fn set_force_native(&mut self, force_native: bool)

Source

pub fn get_force_native(&self) -> bool

Source

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

Source

pub fn get_content_scale_size(&self) -> Vector2i

Source

pub fn set_content_scale_mode(&mut self, mode: ContentScaleMode)

Source

pub fn get_content_scale_mode(&self) -> ContentScaleMode

Source

pub fn set_content_scale_aspect(&mut self, aspect: ContentScaleAspect)

Source

pub fn get_content_scale_aspect(&self) -> ContentScaleAspect

Source

pub fn set_content_scale_stretch(&mut self, stretch: ContentScaleStretch)

Source

pub fn get_content_scale_stretch(&self) -> ContentScaleStretch

Source

pub fn set_keep_title_visible(&mut self, title_visible: bool)

Source

pub fn get_keep_title_visible(&self) -> bool

Source

pub fn set_content_scale_factor(&mut self, factor: f32)

Source

pub fn get_content_scale_factor(&self) -> f32

Source

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

Source

pub fn is_using_font_oversampling(&self) -> bool

Source

pub fn set_mouse_passthrough_polygon(&mut self, polygon: &PackedVector2Array)

Source

pub fn get_mouse_passthrough_polygon(&self) -> PackedVector2Array

Source

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

Source

pub fn is_wrapping_controls(&self) -> bool

Source

pub fn child_controls_changed(&mut self)

Source

pub fn set_theme_type_variation(&mut self, theme_type: impl AsArg<StringName>)

Source

pub fn get_theme_type_variation(&self) -> StringName

Source

pub fn begin_bulk_theme_override(&mut self)

Source

pub fn end_bulk_theme_override(&mut self)

Source

pub fn add_theme_font_size_override( &mut self, name: impl AsArg<StringName>, font_size: i32, )

Source

pub fn add_theme_color_override( &mut self, name: impl AsArg<StringName>, color: Color, )

Source

pub fn add_theme_constant_override( &mut self, name: impl AsArg<StringName>, constant: i32, )

Source

pub fn remove_theme_icon_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn remove_theme_stylebox_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn remove_theme_font_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn remove_theme_font_size_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn remove_theme_color_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn remove_theme_constant_override(&mut self, name: impl AsArg<StringName>)

Source

pub fn get_theme_font_size(&self, name: impl AsArg<StringName>) -> i32

To set the default parameters, use Self::get_theme_font_size_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_theme_font_size_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExGetThemeFontSize<'a>

Source

pub fn get_theme_color(&self, name: impl AsArg<StringName>) -> Color

To set the default parameters, use Self::get_theme_color_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_theme_color_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExGetThemeColor<'a>

Source

pub fn get_theme_constant(&self, name: impl AsArg<StringName>) -> i32

To set the default parameters, use Self::get_theme_constant_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_theme_constant_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExGetThemeConstant<'a>

Source

pub fn has_theme_icon_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_stylebox_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_font_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_font_size_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_color_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_constant_override(&self, name: impl AsArg<StringName>) -> bool

Source

pub fn has_theme_icon(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_icon_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_icon_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeIcon<'a>

Source

pub fn has_theme_stylebox(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_stylebox_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_stylebox_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeStylebox<'a>

Source

pub fn has_theme_font(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_font_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_font_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeFont<'a>

Source

pub fn has_theme_font_size(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_font_size_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_font_size_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeFontSize<'a>

Source

pub fn has_theme_color(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_color_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_color_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeColor<'a>

Source

pub fn has_theme_constant(&self, name: impl AsArg<StringName>) -> bool

To set the default parameters, use Self::has_theme_constant_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn has_theme_constant_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExHasThemeConstant<'a>

Source

pub fn get_theme_default_base_scale(&self) -> f32

Source

pub fn get_theme_default_font_size(&self) -> i32

Source

pub fn set_layout_direction(&mut self, direction: LayoutDirection)

Source

pub fn get_layout_direction(&self) -> LayoutDirection

Source

pub fn is_layout_rtl(&self) -> bool

Source

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

Source

pub fn is_auto_translating(&self) -> bool

Source

pub fn popup(&mut self)

To set the default parameters, use Self::popup_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_ex<'a>(&'a mut self) -> ExPopup<'a>

Source

pub fn popup_on_parent(&mut self, parent_rect: Rect2i)

Source

pub fn popup_centered(&mut self)

To set the default parameters, use Self::popup_centered_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_centered_ex<'a>(&'a mut self) -> ExPopupCentered<'a>

Source

pub fn popup_centered_ratio(&mut self)

To set the default parameters, use Self::popup_centered_ratio_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_centered_ratio_ex<'a>(&'a mut self) -> ExPopupCenteredRatio<'a>

Source

pub fn popup_centered_clamped(&mut self)

To set the default parameters, use Self::popup_centered_clamped_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_centered_clamped_ex<'a>(&'a mut self) -> ExPopupCenteredClamped<'a>

Source

pub fn popup_exclusive(&mut self, from_node: impl AsObjectArg<Node>)

To set the default parameters, use Self::popup_exclusive_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_exclusive_ex<'a>( &'a mut self, from_node: impl AsObjectArg<Node>, ) -> ExPopupExclusive<'a>

Source

pub fn popup_exclusive_on_parent( &mut self, from_node: impl AsObjectArg<Node>, parent_rect: Rect2i, )

Source

pub fn popup_exclusive_centered(&mut self, from_node: impl AsObjectArg<Node>)

To set the default parameters, use Self::popup_exclusive_centered_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_exclusive_centered_ex<'a>( &'a mut self, from_node: impl AsObjectArg<Node>, ) -> ExPopupExclusiveCentered<'a>

Source

pub fn popup_exclusive_centered_ratio( &mut self, from_node: impl AsObjectArg<Node>, )

To set the default parameters, use Self::popup_exclusive_centered_ratio_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_exclusive_centered_ratio_ex<'a>( &'a mut self, from_node: impl AsObjectArg<Node>, ) -> ExPopupExclusiveCenteredRatio<'a>

Source

pub fn popup_exclusive_centered_clamped( &mut self, from_node: impl AsObjectArg<Node>, )

To set the default parameters, use Self::popup_exclusive_centered_clamped_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn popup_exclusive_centered_clamped_ex<'a>( &'a mut self, from_node: impl AsObjectArg<Node>, ) -> ExPopupExclusiveCenteredClamped<'a>

Source

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

⚠️ 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.

Source

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

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

See docs of that method, including the panics.

Methods from Deref<Target = Viewport>§

Source

pub fn set_canvas_transform(&mut self, xform: Transform2D)

Source

pub fn get_canvas_transform(&self) -> Transform2D

Source

pub fn set_global_canvas_transform(&mut self, xform: Transform2D)

Source

pub fn get_global_canvas_transform(&self) -> Transform2D

Source

pub fn get_stretch_transform(&self) -> Transform2D

Source

pub fn get_final_transform(&self) -> Transform2D

Source

pub fn get_screen_transform(&self) -> Transform2D

Source

pub fn get_visible_rect(&self) -> Rect2

Source

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

Source

pub fn has_transparent_background(&self) -> bool

Source

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

Source

pub fn is_using_hdr_2d(&self) -> bool

Source

pub fn set_msaa_2d(&mut self, msaa: Msaa)

Source

pub fn get_msaa_2d(&self) -> Msaa

Source

pub fn set_msaa_3d(&mut self, msaa: Msaa)

Source

pub fn get_msaa_3d(&self) -> Msaa

Source

pub fn set_screen_space_aa(&mut self, screen_space_aa: ScreenSpaceAa)

Source

pub fn get_screen_space_aa(&self) -> ScreenSpaceAa

Source

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

Source

pub fn is_using_taa(&self) -> bool

Source

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

Source

pub fn is_using_debanding(&self) -> bool

Source

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

Source

pub fn is_using_occlusion_culling(&self) -> bool

Source

pub fn set_debug_draw(&mut self, debug_draw: DebugDraw)

Source

pub fn get_debug_draw(&self) -> DebugDraw

Source

pub fn get_render_info( &mut self, type_: RenderInfoType, info: RenderInfo, ) -> i32

Source

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

Source

pub fn get_physics_object_picking(&mut self) -> bool

Source

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

Source

pub fn get_physics_object_picking_sort(&mut self) -> bool

Source

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

Source

pub fn get_physics_object_picking_first_only(&mut self) -> bool

Source

pub fn get_viewport_rid(&self) -> Rid

Source

pub fn push_text_input(&mut self, text: impl AsArg<GString>)

Source

pub fn push_input(&mut self, event: impl AsObjectArg<InputEvent>)

To set the default parameters, use Self::push_input_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn push_input_ex<'a>( &'a mut self, event: impl AsObjectArg<InputEvent>, ) -> ExPushInput<'a>

Source

pub fn push_unhandled_input(&mut self, event: impl AsObjectArg<InputEvent>)

To set the default parameters, use Self::push_unhandled_input_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn push_unhandled_input_ex<'a>( &'a mut self, event: impl AsObjectArg<InputEvent>, ) -> ExPushUnhandledInput<'a>

Source

pub fn notify_mouse_entered(&mut self)

Source

pub fn notify_mouse_exited(&mut self)

Source

pub fn get_mouse_position(&self) -> Vector2

Source

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

Source

pub fn update_mouse_cursor_state(&mut self)

Source

pub fn gui_cancel_drag(&mut self)

Source

pub fn gui_get_drag_data(&self) -> Variant

Source

pub fn gui_is_dragging(&self) -> bool

Source

pub fn gui_is_drag_successful(&self) -> bool

Source

pub fn gui_release_focus(&mut self)

Source

pub fn set_disable_input(&mut self, disable: bool)

Source

pub fn is_input_disabled(&self) -> bool

Source

pub fn set_positional_shadow_atlas_size(&mut self, size: i32)

Source

pub fn get_positional_shadow_atlas_size(&self) -> i32

Source

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

Source

pub fn get_positional_shadow_atlas_16_bits(&self) -> bool

Source

pub fn set_snap_controls_to_pixels(&mut self, enabled: bool)

Source

pub fn is_snap_controls_to_pixels_enabled(&self) -> bool

Source

pub fn set_snap_2d_transforms_to_pixel(&mut self, enabled: bool)

Source

pub fn is_snap_2d_transforms_to_pixel_enabled(&self) -> bool

Source

pub fn set_snap_2d_vertices_to_pixel(&mut self, enabled: bool)

Source

pub fn is_snap_2d_vertices_to_pixel_enabled(&self) -> bool

Source

pub fn set_positional_shadow_atlas_quadrant_subdiv( &mut self, quadrant: i32, subdiv: PositionalShadowAtlasQuadrantSubdiv, )

Source

pub fn get_positional_shadow_atlas_quadrant_subdiv( &self, quadrant: i32, ) -> PositionalShadowAtlasQuadrantSubdiv

Source

pub fn set_input_as_handled(&mut self)

Source

pub fn is_input_handled(&self) -> bool

Source

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

Source

pub fn is_handling_input_locally(&self) -> bool

Source

pub fn set_default_canvas_item_texture_filter( &mut self, mode: DefaultCanvasItemTextureFilter, )

Source

pub fn get_default_canvas_item_texture_filter( &self, ) -> DefaultCanvasItemTextureFilter

Source

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

Source

pub fn is_embedding_subwindows(&self) -> bool

Source

pub fn get_embedded_subwindows(&self) -> Array<Gd<Window>>

Source

pub fn set_canvas_cull_mask(&mut self, mask: u32)

Source

pub fn get_canvas_cull_mask(&self) -> u32

Source

pub fn set_canvas_cull_mask_bit(&mut self, layer: u32, enable: bool)

Source

pub fn get_canvas_cull_mask_bit(&self, layer: u32) -> bool

Source

pub fn set_default_canvas_item_texture_repeat( &mut self, mode: DefaultCanvasItemTextureRepeat, )

Source

pub fn get_default_canvas_item_texture_repeat( &self, ) -> DefaultCanvasItemTextureRepeat

Source

pub fn set_sdf_oversize(&mut self, oversize: SdfOversize)

Source

pub fn get_sdf_oversize(&self) -> SdfOversize

Source

pub fn set_sdf_scale(&mut self, scale: SdfScale)

Source

pub fn get_sdf_scale(&self) -> SdfScale

Source

pub fn set_mesh_lod_threshold(&mut self, pixels: f32)

Source

pub fn get_mesh_lod_threshold(&self) -> f32

Source

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

Source

pub fn is_audio_listener_2d(&self) -> bool

Source

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

Source

pub fn is_using_own_world_3d(&self) -> bool

Source

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

Source

pub fn is_audio_listener_3d(&self) -> bool

Source

pub fn set_disable_3d(&mut self, disable: bool)

Source

pub fn is_3d_disabled(&self) -> bool

Source

pub fn set_use_xr(&mut self, use_: bool)

Source

pub fn is_using_xr(&mut self) -> bool

Source

pub fn set_scaling_3d_mode(&mut self, scaling_3d_mode: Scaling3DMode)

Source

pub fn get_scaling_3d_mode(&self) -> Scaling3DMode

Source

pub fn set_scaling_3d_scale(&mut self, scale: f32)

Source

pub fn get_scaling_3d_scale(&self) -> f32

Source

pub fn set_fsr_sharpness(&mut self, fsr_sharpness: f32)

Source

pub fn get_fsr_sharpness(&self) -> f32

Source

pub fn set_texture_mipmap_bias(&mut self, texture_mipmap_bias: f32)

Source

pub fn get_texture_mipmap_bias(&self) -> f32

Source

pub fn set_anisotropic_filtering_level( &mut self, anisotropic_filtering_level: AnisotropicFiltering, )

Source

pub fn get_anisotropic_filtering_level(&self) -> AnisotropicFiltering

Source

pub fn set_vrs_mode(&mut self, mode: VrsMode)

Source

pub fn get_vrs_mode(&self) -> VrsMode

Source

pub fn set_vrs_update_mode(&mut self, mode: VrsUpdateMode)

Source

pub fn get_vrs_update_mode(&self) -> VrsUpdateMode

Methods from Deref<Target = Node>§

Source

pub fn get_node_as<T>(&self, path: impl AsArg<NodePath>) -> Gd<T>
where T: Inherits<Node>,

⚠️ Retrieves the node at path path, panicking if not found or bad type.

§Panics

If the node is not found, or if it does not have type T or inherited.

Source

pub fn try_get_node_as<T>(&self, path: impl AsArg<NodePath>) -> Option<Gd<T>>
where T: Inherits<Node>,

Retrieves the node at path path (fallible).

If the node is not found, or if it does not have type T or inherited, None will be returned.

Source

pub fn add_sibling(&mut self, sibling: impl AsObjectArg<Node>)

To set the default parameters, use Self::add_sibling_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn add_sibling_ex<'a>( &'a mut self, sibling: impl AsObjectArg<Node>, ) -> ExAddSibling<'a>

Source

pub fn set_name(&mut self, name: impl AsArg<GString>)

Source

pub fn get_name(&self) -> StringName

Source

pub fn add_child(&mut self, node: impl AsObjectArg<Node>)

To set the default parameters, use Self::add_child_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn add_child_ex<'a>( &'a mut self, node: impl AsObjectArg<Node>, ) -> ExAddChild<'a>

Source

pub fn remove_child(&mut self, node: impl AsObjectArg<Node>)

Source

pub fn reparent(&mut self, new_parent: impl AsObjectArg<Node>)

To set the default parameters, use Self::reparent_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn reparent_ex<'a>( &'a mut self, new_parent: impl AsObjectArg<Node>, ) -> ExReparent<'a>

Source

pub fn get_child_count(&self) -> i32

To set the default parameters, use Self::get_child_count_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_child_count_ex<'a>(&'a self) -> ExGetChildCount<'a>

Source

pub fn get_children(&self) -> Array<Gd<Node>>

To set the default parameters, use Self::get_children_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_children_ex<'a>(&'a self) -> ExGetChildren<'a>

Source

pub fn get_child(&self, idx: i32) -> Option<Gd<Node>>

To set the default parameters, use Self::get_child_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_child_ex<'a>(&'a self, idx: i32) -> ExGetChild<'a>

Source

pub fn has_node(&self, path: impl AsArg<NodePath>) -> bool

Source

pub fn get_node_or_null(&self, path: impl AsArg<NodePath>) -> Option<Gd<Node>>

Source

pub fn get_parent(&self) -> Option<Gd<Node>>

Source

pub fn find_child(&self, pattern: impl AsArg<GString>) -> Option<Gd<Node>>

To set the default parameters, use Self::find_child_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn find_child_ex<'a>( &'a self, pattern: impl AsArg<GString> + 'a, ) -> ExFindChild<'a>

Source

pub fn find_children(&self, pattern: impl AsArg<GString>) -> Array<Gd<Node>>

To set the default parameters, use Self::find_children_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn find_children_ex<'a>( &'a self, pattern: impl AsArg<GString> + 'a, ) -> ExFindChildren<'a>

Source

pub fn find_parent(&self, pattern: impl AsArg<GString>) -> Option<Gd<Node>>

Source

pub fn has_node_and_resource(&self, path: impl AsArg<NodePath>) -> bool

Source

pub fn get_node_and_resource( &mut self, path: impl AsArg<NodePath>, ) -> VariantArray

Source

pub fn is_inside_tree(&self) -> bool

Source

pub fn is_part_of_edited_scene(&self) -> bool

Source

pub fn is_ancestor_of(&self, node: impl AsObjectArg<Node>) -> bool

Source

pub fn is_greater_than(&self, node: impl AsObjectArg<Node>) -> bool

Source

pub fn get_path(&self) -> NodePath

Source

pub fn get_path_to(&self, node: impl AsObjectArg<Node>) -> NodePath

To set the default parameters, use Self::get_path_to_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_path_to_ex<'a>( &'a self, node: impl AsObjectArg<Node>, ) -> ExGetPathTo<'a>

Source

pub fn add_to_group(&mut self, group: impl AsArg<StringName>)

To set the default parameters, use Self::add_to_group_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn add_to_group_ex<'a>( &'a mut self, group: impl AsArg<StringName> + 'a, ) -> ExAddToGroup<'a>

Source

pub fn remove_from_group(&mut self, group: impl AsArg<StringName>)

Source

pub fn is_in_group(&self, group: impl AsArg<StringName>) -> bool

Source

pub fn move_child(&mut self, child_node: impl AsObjectArg<Node>, to_index: i32)

Source

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

Source

pub fn set_owner(&mut self, owner: impl AsObjectArg<Node>)

Source

pub fn get_owner(&self) -> Option<Gd<Node>>

Source

pub fn get_index(&self) -> i32

To set the default parameters, use Self::get_index_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_index_ex<'a>(&'a self) -> ExGetIndex<'a>

Source

pub fn print_tree(&mut self)

Source

pub fn print_tree_pretty(&mut self)

Source

pub fn get_tree_string(&mut self) -> GString

Source

pub fn get_tree_string_pretty(&mut self) -> GString

Source

pub fn set_scene_file_path(&mut self, scene_file_path: impl AsArg<GString>)

Source

pub fn get_scene_file_path(&self) -> GString

Source

pub fn propagate_notification(&mut self, what: i32)

Source

pub fn propagate_call(&mut self, method: impl AsArg<StringName>)

To set the default parameters, use Self::propagate_call_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn propagate_call_ex<'a>( &'a mut self, method: impl AsArg<StringName> + 'a, ) -> ExPropagateCall<'a>

Source

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

Source

pub fn get_physics_process_delta_time(&self) -> f64

Source

pub fn is_physics_processing(&self) -> bool

Source

pub fn get_process_delta_time(&self) -> f64

Source

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

Source

pub fn set_process_priority(&mut self, priority: i32)

Source

pub fn get_process_priority(&self) -> i32

Source

pub fn set_physics_process_priority(&mut self, priority: i32)

Source

pub fn get_physics_process_priority(&self) -> i32

Source

pub fn is_processing(&self) -> bool

Source

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

Source

pub fn is_processing_input(&self) -> bool

Source

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

Source

pub fn is_processing_shortcut_input(&self) -> bool

Source

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

Source

pub fn is_processing_unhandled_input(&self) -> bool

Source

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

Source

pub fn is_processing_unhandled_key_input(&self) -> bool

Source

pub fn set_process_mode(&mut self, mode: ProcessMode)

Source

pub fn get_process_mode(&self) -> ProcessMode

Source

pub fn can_process(&self) -> bool

Source

pub fn set_process_thread_group(&mut self, mode: ProcessThreadGroup)

Source

pub fn get_process_thread_group(&self) -> ProcessThreadGroup

Source

pub fn set_process_thread_messages(&mut self, flags: ProcessThreadMessages)

Source

pub fn get_process_thread_messages(&self) -> ProcessThreadMessages

Source

pub fn set_process_thread_group_order(&mut self, order: i32)

Source

pub fn get_process_thread_group_order(&self) -> i32

Source

pub fn set_display_folded(&mut self, fold: bool)

Source

pub fn is_displayed_folded(&self) -> bool

Source

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

Source

pub fn is_processing_internal(&self) -> bool

Source

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

Source

pub fn is_physics_processing_internal(&self) -> bool

Source

pub fn set_physics_interpolation_mode(&mut self, mode: PhysicsInterpolationMode)

Source

pub fn get_physics_interpolation_mode(&self) -> PhysicsInterpolationMode

Source

pub fn is_physics_interpolated(&self) -> bool

Source

pub fn is_physics_interpolated_and_enabled(&self) -> bool

Source

pub fn reset_physics_interpolation(&mut self)

Source

pub fn set_auto_translate_mode(&mut self, mode: AutoTranslateMode)

Source

pub fn get_auto_translate_mode(&self) -> AutoTranslateMode

Source

pub fn set_translation_domain_inherited(&mut self)

Source

pub fn get_window(&self) -> Option<Gd<Window>>

Source

pub fn get_last_exclusive_window(&self) -> Option<Gd<Window>>

Source

pub fn get_tree(&self) -> Option<Gd<SceneTree>>

Source

pub fn duplicate(&self) -> Option<Gd<Node>>

To set the default parameters, use Self::duplicate_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn duplicate_ex<'a>(&'a self) -> ExDuplicate<'a>

Source

pub fn replace_by(&mut self, node: impl AsObjectArg<Node>)

To set the default parameters, use Self::replace_by_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn replace_by_ex<'a>( &'a mut self, node: impl AsObjectArg<Node>, ) -> ExReplaceBy<'a>

Source

pub fn set_scene_instance_load_placeholder(&mut self, load_placeholder: bool)

Source

pub fn get_scene_instance_load_placeholder(&self) -> bool

Source

pub fn set_editable_instance( &mut self, node: impl AsObjectArg<Node>, is_editable: bool, )

Source

pub fn is_editable_instance(&self, node: impl AsObjectArg<Node>) -> bool

Source

pub fn get_viewport(&self) -> Option<Gd<Viewport>>

Source

pub fn queue_free(&mut self)

Source

pub fn request_ready(&mut self)

Source

pub fn is_node_ready(&self) -> bool

Source

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

To set the default parameters, use Self::set_multiplayer_authority_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn set_multiplayer_authority_ex<'a>( &'a mut self, id: i32, ) -> ExSetMultiplayerAuthority<'a>

Source

pub fn get_multiplayer_authority(&self) -> i32

Source

pub fn is_multiplayer_authority(&self) -> bool

Source

pub fn rpc_config(&mut self, method: impl AsArg<StringName>, config: &Variant)

Source

pub fn get_rpc_config(&self) -> Variant

Source

pub fn set_editor_description( &mut self, editor_description: impl AsArg<GString>, )

Source

pub fn get_editor_description(&self) -> GString

Source

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

Source

pub fn is_unique_name_in_owner(&self) -> bool

Source

pub fn atr(&self, message: impl AsArg<GString>) -> GString

To set the default parameters, use Self::atr_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn atr_ex<'a>(&'a self, message: impl AsArg<GString> + 'a) -> ExAtr<'a>

Source

pub fn atr_n( &self, message: impl AsArg<GString>, plural_message: impl AsArg<StringName>, n: i32, ) -> GString

To set the default parameters, use Self::atr_n_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn atr_n_ex<'a>( &'a self, message: impl AsArg<GString> + 'a, plural_message: impl AsArg<StringName> + 'a, n: i32, ) -> ExAtrN<'a>

Source

pub fn rpc( &mut self, method: impl AsArg<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.

Source

pub fn try_rpc( &mut self, method: impl AsArg<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.

Source

pub fn rpc_id( &mut self, peer_id: i64, method: impl AsArg<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.

Source

pub fn try_rpc_id( &mut self, peer_id: i64, method: impl AsArg<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.

Source

pub fn update_configuration_warnings(&mut self)

Source

pub fn call_deferred_thread_group( &mut self, method: impl AsArg<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.

Source

pub fn try_call_deferred_thread_group( &mut self, method: impl AsArg<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.

Source

pub fn set_deferred_thread_group( &mut self, property: impl AsArg<StringName>, value: &Variant, )

Source

pub fn notify_deferred_thread_group(&mut self, what: i32)

Source

pub fn call_thread_safe( &mut self, method: impl AsArg<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.

Source

pub fn try_call_thread_safe( &mut self, method: impl AsArg<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.

Source

pub fn set_thread_safe( &mut self, property: impl AsArg<StringName>, value: &Variant, )

Source

pub fn notify_thread_safe(&mut self, what: i32)

Source

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

⚠️ 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.

Source

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

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

See docs of that method, including the panics.

Methods from Deref<Target = Object>§

Source

pub fn get_class(&self) -> GString

Source

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

Source

pub fn set(&mut self, property: impl AsArg<StringName>, value: &Variant)

Source

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

Source

pub fn set_indexed( &mut self, property_path: impl AsArg<NodePath>, value: &Variant, )

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub fn get_script(&self) -> Variant

Source

pub fn set_meta(&mut self, name: impl AsArg<StringName>, value: &Variant)

Source

pub fn remove_meta(&mut self, name: impl AsArg<StringName>)

Source

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

To set the default parameters, use Self::get_meta_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn get_meta_ex<'a>( &'a self, name: impl AsArg<StringName> + 'a, ) -> ExGetMeta<'a>

Source

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

Source

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

Source

pub fn add_user_signal(&mut self, signal: impl AsArg<GString>)

To set the default parameters, use Self::add_user_signal_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn add_user_signal_ex<'a>( &'a mut self, signal: impl AsArg<GString> + 'a, ) -> ExAddUserSignal<'a>

Source

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

Source

pub fn remove_user_signal(&mut self, signal: impl AsArg<StringName>)

Source

pub fn emit_signal( &mut self, signal: impl AsArg<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.

Source

pub fn try_emit_signal( &mut self, signal: impl AsArg<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.

Source

pub fn call( &mut self, method: impl AsArg<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.

Source

pub fn try_call( &mut self, method: impl AsArg<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.

Source

pub fn call_deferred( &mut self, method: impl AsArg<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.

Source

pub fn try_call_deferred( &mut self, method: impl AsArg<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.

Source

pub fn set_deferred( &mut self, property: impl AsArg<StringName>, value: &Variant, )

Source

pub fn callv( &mut self, method: impl AsArg<StringName>, arg_array: &VariantArray, ) -> Variant

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

To set the default parameters, use Self::connect_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn connect_ex<'a>( &'a mut self, signal: impl AsArg<StringName> + 'a, callable: &'a Callable, ) -> ExConnect<'a>

Source

pub fn disconnect( &mut self, signal: impl AsArg<StringName>, callable: &Callable, )

Source

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

Source

pub fn has_connections(&self, signal: impl AsArg<StringName>) -> bool

Source

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

Source

pub fn is_blocking_signals(&self) -> bool

Source

pub fn notify_property_list_changed(&mut self)

Source

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

Source

pub fn can_translate_messages(&self) -> bool

Source

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

To set the default parameters, use Self::tr_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn tr_ex<'a>(&'a self, message: impl AsArg<StringName> + 'a) -> ExTr<'a>

Source

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

To set the default parameters, use Self::tr_n_ex and its builder methods. See the book for detailed usage instructions.

Source

pub fn tr_n_ex<'a>( &'a self, message: impl AsArg<StringName> + 'a, plural_message: impl AsArg<StringName> + 'a, n: i32, ) -> ExTrN<'a>

Source

pub fn get_translation_domain(&self) -> StringName

Source

pub fn set_translation_domain(&mut self, domain: impl AsArg<StringName>)

Source

pub fn is_queued_for_deletion(&self) -> bool

Source

pub fn cancel_free(&mut self)

Source

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.

Source

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§

Source§

impl Bounds for Window

Source§

type Memory = MemManual

Defines the memory strategy of the static type.
Source§

type Declarer = DeclEngine

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

impl Debug for Window

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Deref for Window

Source§

type Target = Viewport

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for Window

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl GodotClass for Window

Source§

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

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

type Base = Viewport

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

fn class_name() -> ClassName

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

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

Returns whether Self inherits from U. Read more
Source§

impl WithSignals for Window

Available on since_api="4.2" only.
Source§

type SignalCollection<'c, C: WithSignals> = SignalsOfWindow<'c, C>

The associated struct listing all signals of this class. Read more
Source§

impl GodotDefault for Window

Source§

impl Inherits<Node> for Window

Source§

impl Inherits<Object> for Window

Source§

impl Inherits<Viewport> for Window

Auto Trait Implementations§

§

impl Freeze for Window

§

impl RefUnwindSafe for Window

§

impl !Send for Window

§

impl !Sync for Window

§

impl Unpin for Window

§

impl UnwindSafe for Window

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> NewAlloc for T
where T: GodotDefault<Memory = MemManual> + Bounds,

Source§

fn new_alloc() -> Gd<T>

Return a new, manually-managed Gd containing a default-constructed instance. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> UniformObjectDeref<DeclEngine> for T
where T: GodotClass<Declarer = DeclEngine>,

Source§

type TargetRef<'a> = Gd<T>

Source§

type TargetMut<'a> = Gd<T>

Source§

fn object_as_ref<'a>( gd: &'a Gd<T>, ) -> <T as UniformObjectDeref<DeclEngine>>::TargetRef<'a>

Source§

fn object_as_mut<'a>( gd: &'a mut Gd<T>, ) -> <T as UniformObjectDeref<DeclEngine>>::TargetMut<'a>

Source§

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