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
//! `ITimersComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Timers/timers.hpp`.
//! Implemented by `TimersComponent` in the server's `Timers`.
//!
//! 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::*;
impl ComponentInterface for ITimersComponent {
const UID: UID = TIMERS_COMPONENT_UID;
}
slots! {
/// `ITimer * ITimersComponent::create(TimerTimeOutHandler *, Milliseconds, Milliseconds, unsigned int)`
SLOT_CREATE_COUNTED: usize = 19, 16;
/// `const size_t ITimersComponent::count()`
SLOT_COUNT: usize = 20, 18;
}
virtual_fns! {
/// `ITimer * ITimersComponent::create(TimerTimeOutHandler *, Milliseconds, Milliseconds, unsigned int)`.
///
/// # Safety
/// `component` must be a live `ITimersComponent`.
#[must_use]
pub fn timers_create_counted(
component: ITimersComponent,
handler: *mut TimerTimeOutHandler,
initial: Milliseconds,
interval: Milliseconds,
count: u32,
) -> *mut ITimer = [0, SLOT_CREATE_COUNTED] or std::ptr::null_mut();
/// `const size_t ITimersComponent::count()`.
///
/// # Safety
/// `component` must be a live `ITimersComponent`.
#[must_use]
pub fn timers_count(component: ITimersComponent) -> usize = [0, SLOT_COUNT] or 0;
}
// What the generator left out, and why.
// skipped: `ITimer * ITimersComponent::create(TimerTimeOutHandler *, Milliseconds, bool)` — covered by a hand-written wrapper under another name