godot_core/classes/
mod.rs

1/*
2 * Copyright (c) godot-rust; Bromeon and contributors.
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
6 */
7
8//! Maps the Godot class API to Rust.
9//!
10//! This module contains the following symbols:
11//! * Classes: `CanvasItem`, etc.
12//! * Interface traits: `ICanvasItem`, etc.
13//! * Enum/flag modules: `canvas_item`, etc.
14//!
15//! Noteworthy sub-modules of `godot::classes` are:
16//! * [`native`]: definition of _native structure_ types.
17//! * [`notify`]: all notification enums, used when working with the virtual callback to handle lifecycle notifications.
18
19mod class_runtime;
20mod manual_extensions;
21
22// Re-exports all generated classes, interface traits and sidecar modules.
23pub use crate::gen::classes::*;
24
25/// Support for Godot _native structures_.
26///
27/// Native structures are a niche API in Godot. These are low-level data types that are passed as pointers to/from the engine.
28/// In Rust, they are represented as `#[repr(C)]` structs.
29///
30/// There is unfortunately not much official documentation available; you may need to look at Godot source code.
31/// Most users will not need native structures, as they are very specialized.
32pub mod native {
33    pub use crate::gen::native::*;
34}
35
36// ----------------------------------------------------------------------------------------------------------------------------------------------
37// Crate-local utilities
38
39pub(crate) use class_runtime::*;