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;
21mod match_class;
22mod type_safe_replacements;
23
24// Re-exports all generated classes, interface traits and sidecar modules.
25pub use crate::gen::classes::*;
26// Macro re-export.
27pub use crate::match_class;
28
29/// Support for Godot _native structures_.
30///
31/// Native structures are a niche API in Godot. These are low-level data types that are passed as pointers to/from the engine.
32/// In Rust, they are represented as `#[repr(C)]` structs.
33///
34/// There is unfortunately not much official documentation available; you may need to look at Godot source code.
35/// Most users will not need native structures, as they are very specialized.
36pub mod native {
37 pub use crate::gen::native::*;
38}
39
40// ----------------------------------------------------------------------------------------------------------------------------------------------
41// Crate-local utilities
42
43pub(crate) use class_runtime::*;