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
//! `IConsoleComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Console/console.hpp`.
//! Implemented by `ConsoleComponent` in the server's `Console`.
//!
//! 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::*;
opaque! {
/// Opaque handle for `IConsoleComponent*`.
pub IConsoleComponent;
}
/// `ConsoleComponent_UID` in `Server/Components/Console/console.hpp`.
pub const CONSOLE_COMPONENT_UID: UID = 0xbfa24e49d0c95ee4;
impl ComponentInterface for IConsoleComponent {
const UID: UID = CONSOLE_COMPONENT_UID;
}
slots! {
/// `IEventDispatcher<ConsoleEventHandler> & IConsoleComponent::getEventDispatcher()`
SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
/// `void IConsoleComponent::send(StringView, const ConsoleCommandSenderData &)`
SLOT_SEND: usize = 19, 17;
/// `void IConsoleComponent::sendMessage(const ConsoleCommandSenderData &, StringView)`
SLOT_SEND_MESSAGE: usize = 20, 18;
}
virtual_fns! {
/// `IEventDispatcher<ConsoleEventHandler> & IConsoleComponent::getEventDispatcher()`.
///
/// # Safety
/// `component` must be a live `IConsoleComponent`.
#[must_use]
pub fn console_event_dispatcher(
component: IConsoleComponent,
) -> *mut EventDispatcher<ConsoleHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();
/// `void IConsoleComponent::send(StringView, const ConsoleCommandSenderData &)`.
///
/// # Safety
/// `component` must be a live `IConsoleComponent`.
pub fn console_send(
component: IConsoleComponent,
command: StringView,
sender: &ConsoleCommandSenderData,
) = [0, SLOT_SEND];
/// `void IConsoleComponent::sendMessage(const ConsoleCommandSenderData &, StringView)`.
///
/// # Safety
/// `component` must be a live `IConsoleComponent`.
pub fn console_send_message(
component: IConsoleComponent,
recipient: &ConsoleCommandSenderData,
message: StringView,
) = [0, SLOT_SEND_MESSAGE];
}