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
//! `IObjectsComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Objects/objects.hpp`.
//! Implemented by `ObjectComponent` in the server's `Objects`.
//!
//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
//! regenerate. Slots are clang's layout of the header for each ABI, checked
//! against the official binaries by `cargo xtask check-abi --generated`.
#![allow(unused_imports)]
use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
use crate::omp::types::{
Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
UID, Vector2, Vector3, Vector4, WorldTimePoint,
};
use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
use crate::omp::*;
slots! {
/// `IEventDispatcher<ObjectEventHandler> & IObjectsComponent::getEventDispatcher()`
SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
/// `void IObjectsComponent::setDefaultCameraCollision(bool)`
SLOT_SET_DEFAULT_CAMERA_COLLISION: usize = 19, 17;
/// `bool IObjectsComponent::getDefaultCameraCollision()`
SLOT_GET_DEFAULT_CAMERA_COLLISION: usize = 20, 18;
}
virtual_fns! {
/// `IEventDispatcher<ObjectEventHandler> & IObjectsComponent::getEventDispatcher()`.
///
/// # Safety
/// `component` must be a live `IObjectsComponent`.
#[must_use]
pub fn objects_event_dispatcher(
component: IObjectsComponent,
) -> *mut EventDispatcher<ObjectHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();
/// `void IObjectsComponent::setDefaultCameraCollision(bool)`.
///
/// # Safety
/// `component` must be a live `IObjectsComponent`.
pub fn objects_set_default_camera_collision(
component: IObjectsComponent,
collision: bool,
) = [0, SLOT_SET_DEFAULT_CAMERA_COLLISION];
/// `bool IObjectsComponent::getDefaultCameraCollision()`.
///
/// # Safety
/// `component` must be a live `IObjectsComponent`.
#[must_use]
pub fn objects_default_camera_collision(
component: IObjectsComponent,
) -> bool = [0, SLOT_GET_DEFAULT_CAMERA_COLLISION] or false;
}
// What the generator left out, and why.
// skipped: `IObject * IObjectsComponent::create(int, Vector3, Vector3, float)` — covered by a hand-written wrapper under another name