samp_sdk/omp/generated/console.rs
1//! `IConsoleComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Console/console.hpp`.
2//! Implemented by `ConsoleComponent` in the server's `Console`.
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
18opaque! {
19 /// Opaque handle for `IConsoleComponent*`.
20 pub IConsoleComponent;
21}
22
23/// `ConsoleComponent_UID` in `Server/Components/Console/console.hpp`.
24pub const CONSOLE_COMPONENT_UID: UID = 0xbfa24e49d0c95ee4;
25
26impl ComponentInterface for IConsoleComponent {
27 const UID: UID = CONSOLE_COMPONENT_UID;
28}
29
30slots! {
31 /// `IEventDispatcher<ConsoleEventHandler> & IConsoleComponent::getEventDispatcher()`
32 SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
33 /// `void IConsoleComponent::send(StringView, const ConsoleCommandSenderData &)`
34 SLOT_SEND: usize = 19, 17;
35 /// `void IConsoleComponent::sendMessage(const ConsoleCommandSenderData &, StringView)`
36 SLOT_SEND_MESSAGE: usize = 20, 18;
37}
38
39virtual_fns! {
40 /// `IEventDispatcher<ConsoleEventHandler> & IConsoleComponent::getEventDispatcher()`.
41 ///
42 /// # Safety
43 /// `component` must be a live `IConsoleComponent`.
44 #[must_use]
45 pub fn console_event_dispatcher(
46 component: IConsoleComponent,
47 ) -> *mut EventDispatcher<ConsoleHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();
48
49 /// `void IConsoleComponent::send(StringView, const ConsoleCommandSenderData &)`.
50 ///
51 /// # Safety
52 /// `component` must be a live `IConsoleComponent`.
53 pub fn console_send(
54 component: IConsoleComponent,
55 command: StringView,
56 sender: &ConsoleCommandSenderData,
57 ) = [0, SLOT_SEND];
58
59 /// `void IConsoleComponent::sendMessage(const ConsoleCommandSenderData &, StringView)`.
60 ///
61 /// # Safety
62 /// `component` must be a live `IConsoleComponent`.
63 pub fn console_send_message(
64 component: IConsoleComponent,
65 recipient: &ConsoleCommandSenderData,
66 message: StringView,
67 ) = [0, SLOT_SEND_MESSAGE];
68}