rust-samp-sdk 3.6.0

Low-level FFI bindings for the SA-MP AMX virtual machine and open.mp native component ABI. Used internally by `rust-samp`; depend on it directly only if you need raw access without the higher-level macros and lifecycle.
Documentation
//! `IGangZonesComponent` — generated by `cargo xtask gen-omp` from `Server/Components/GangZones/gangzones.hpp`.
//! Implemented by `GangZonesComponent` in the server's `GangZones`.
//!
//! 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<GangZoneEventHandler> & IGangZonesComponent::getEventDispatcher()`
    SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
    /// `const FlatHashSet<IGangZone *> & IGangZonesComponent::getCheckingGangZones()`
    SLOT_GET_CHECKING_GANG_ZONES: usize = 20, 18;
    /// `void IGangZonesComponent::useGangZoneCheck(IGangZone &, bool)`
    SLOT_USE_GANG_ZONE_CHECK: usize = 21, 19;
    /// `int IGangZonesComponent::toLegacyID(int)`
    SLOT_TO_LEGACY_ID: usize = 22, 20;
    /// `int IGangZonesComponent::fromLegacyID(int)`
    SLOT_FROM_LEGACY_ID: usize = 23, 21;
    /// `void IGangZonesComponent::releaseLegacyID(int)`
    SLOT_RELEASE_LEGACY_ID: usize = 24, 22;
    /// `int IGangZonesComponent::reserveLegacyID()`
    SLOT_RESERVE_LEGACY_ID: usize = 25, 23;
    /// `void IGangZonesComponent::setLegacyID(int, int)`
    SLOT_SET_LEGACY_ID: usize = 26, 24;
}

virtual_fns! {
    /// `IEventDispatcher<GangZoneEventHandler> & IGangZonesComponent::getEventDispatcher()`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    #[must_use]
    pub fn gangzones_event_dispatcher(
        component: IGangZonesComponent,
    ) -> *mut EventDispatcher<GangZoneHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();

    /// `const FlatHashSet<IGangZone *> & IGangZonesComponent::getCheckingGangZones()`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    #[must_use]
    pub fn gangzones_checking_gang_zones(
        component: IGangZonesComponent,
    ) -> *const FlatSet<IGangZone> = [0, SLOT_GET_CHECKING_GANG_ZONES] or std::ptr::null();

    /// `void IGangZonesComponent::useGangZoneCheck(IGangZone &, bool)`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    pub fn gangzones_use_gang_zone_check(
        component: IGangZonesComponent,
        zone: *mut IGangZone,
        enable: bool,
    ) = [0, SLOT_USE_GANG_ZONE_CHECK];

    /// `int IGangZonesComponent::toLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    #[must_use]
    pub fn gangzones_to_legacy_id(
        component: IGangZonesComponent,
        real: i32,
    ) -> i32 = [0, SLOT_TO_LEGACY_ID] or 0;

    /// `int IGangZonesComponent::fromLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    #[must_use]
    pub fn gangzones_from_legacy_id(
        component: IGangZonesComponent,
        legacy: i32,
    ) -> i32 = [0, SLOT_FROM_LEGACY_ID] or 0;

    /// `void IGangZonesComponent::releaseLegacyID(int)`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    pub fn gangzones_release_legacy_id(
        component: IGangZonesComponent,
        legacy: i32,
    ) = [0, SLOT_RELEASE_LEGACY_ID];

    /// `int IGangZonesComponent::reserveLegacyID()`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    #[must_use]
    pub fn gangzones_reserve_legacy_id(
        component: IGangZonesComponent,
    ) -> i32 = [0, SLOT_RESERVE_LEGACY_ID] or 0;

    /// `void IGangZonesComponent::setLegacyID(int, int)`.
    ///
    /// # Safety
    /// `component` must be a live `IGangZonesComponent`.
    pub fn gangzones_set_legacy_id(
        component: IGangZonesComponent,
        legacy: i32,
        real: i32,
    ) = [0, SLOT_SET_LEGACY_ID];
}

// What the generator left out, and why.
// skipped: `IGangZone * IGangZonesComponent::create(GangZonePos)` — covered by a hand-written wrapper under another name