1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Copyright (c) godot-rust; Bromeon and contributors.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
//! Godot global enums, constants and utility functions.
//!
//! See also [Godot docs for `@GlobalScope`](https://docs.godotengine.org/en/stable/classes/class_@globalscope.html#methods).
//!
//! # Functions moved to dedicated APIs
//! Some methods in `@GlobalScope` are not directly available in `godot::global` module, but rather in their related types. \
//! You can find them as follows:
//!
//! | Godot utility function | godot-rust APIs |
//! |------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
//! | `instance_from_id` | [`Gd::from_instance_id()`][crate::obj::Gd::from_instance_id]<br>[`Gd::try_from_instance_id()`][crate::obj::Gd::try_from_instance_id()] |
//! | `is_instance_valid` | [`Gd::is_instance_valid()`][crate::obj::Gd::is_instance_valid()] |
//! | `is_instance_id_valid` | [`InstanceId::lookup_validity()`][crate::obj::InstanceId::lookup_validity()] |
//!
//! # Global enums in other modules
//! The library ships several additional enums in places where GDScript would use magic numbers. These are co-located with
//! builtin types, in the [`godot::builtin`][crate::builtin] module. The enums are:
//!
//! - Color: [`ColorChannelOrder`][crate::builtin::ColorChannelOrder]
//! - Projection: [`ProjectionEye`][crate::builtin::ProjectionEye], [`ProjectionPlane`][crate::builtin::ProjectionPlane]
//! - Rectangle: [`Side`], [`Corner`] <sub>(godot-generated)</sub>
//! - Rotation: [`EulerOrder`] <sub>(godot-generated)</sub>
//! - Variant: [`VariantType`][crate::builtin::VariantType], [`VariantOperator`][crate::builtin::VariantOperator]
//! - Vector: [`Vector2Axis`][crate::builtin::Vector2Axis], [`Vector3Axis`][crate::builtin::Vector3Axis], [`Vector4Axis`][crate::builtin::Vector4Axis]
//!
//! Some enums are closely related to property/method registration and are located in [`godot::register::info`][crate::registry::info]:
//!
//! - [`PropertyHint`] <sub>(godot-generated)</sub>
//! - [`PropertyUsageFlags`] <sub>(godot-generated)</sub>
//! - [`MethodFlags`] <sub>(godot-generated)</sub>
// Doc aliases are also available in dedicated APIs, but directing people here may give them a bit more context.
// Some enums are directly re-exported from crate::builtin.
pub use crater#*;
pub use crater#*;
pub use crate::;
// ----------------------------------------------------------------------------------------------------------------------------------------------
// Internal re-exports
// This is needed for generated classes to find symbols, even those that have been moved to crate::builtin.
// micromanaging imports for generated code is not fun
// Do not reorder.
pub use crate;
// This is needed for generated code to find symbols that have been moved to crate::registry::info.
pub use crate;
// ----------------------------------------------------------------------------------------------------------------------------------------------
// Deprecations