samp_sdk/omp/generated/objects.rs
1//! `IObjectsComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Objects/objects.hpp`.
2//! Implemented by `ObjectComponent` in the server's `Objects`.
3//!
4//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
5//! regenerate. Slots are clang's layout of the header for each ABI, checked
6//! against the official binaries by `cargo xtask check-abi --generated`.
7
8#![allow(unused_imports)]
9
10use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
11use crate::omp::types::{
12 Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
13 UID, Vector2, Vector3, Vector4, WorldTimePoint,
14};
15use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
16use crate::omp::*;
17
18slots! {
19 /// `IEventDispatcher<ObjectEventHandler> & IObjectsComponent::getEventDispatcher()`
20 SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
21 /// `void IObjectsComponent::setDefaultCameraCollision(bool)`
22 SLOT_SET_DEFAULT_CAMERA_COLLISION: usize = 19, 17;
23 /// `bool IObjectsComponent::getDefaultCameraCollision()`
24 SLOT_GET_DEFAULT_CAMERA_COLLISION: usize = 20, 18;
25}
26
27virtual_fns! {
28 /// `IEventDispatcher<ObjectEventHandler> & IObjectsComponent::getEventDispatcher()`.
29 ///
30 /// # Safety
31 /// `component` must be a live `IObjectsComponent`.
32 #[must_use]
33 pub fn objects_event_dispatcher(
34 component: IObjectsComponent,
35 ) -> *mut EventDispatcher<ObjectHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();
36
37 /// `void IObjectsComponent::setDefaultCameraCollision(bool)`.
38 ///
39 /// # Safety
40 /// `component` must be a live `IObjectsComponent`.
41 pub fn objects_set_default_camera_collision(
42 component: IObjectsComponent,
43 collision: bool,
44 ) = [0, SLOT_SET_DEFAULT_CAMERA_COLLISION];
45
46 /// `bool IObjectsComponent::getDefaultCameraCollision()`.
47 ///
48 /// # Safety
49 /// `component` must be a live `IObjectsComponent`.
50 #[must_use]
51 pub fn objects_default_camera_collision(
52 component: IObjectsComponent,
53 ) -> bool = [0, SLOT_GET_DEFAULT_CAMERA_COLLISION] or false;
54}
55
56// What the generator left out, and why.
57// skipped: `IObject * IObjectsComponent::create(int, Vector3, Vector3, float)` — covered by a hand-written wrapper under another name