fmod/studio/event_description/
mod.rs

1// Copyright (c) 2024 Lily Lyons
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at https://mozilla.org/MPL/2.0/.
6
7use fmod_sys::*;
8
9mod attributes;
10mod callback;
11mod general;
12mod instance;
13mod parameter;
14mod sample_data;
15mod user_property;
16
17#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
18#[repr(transparent)] // so we can transmute between types
19pub struct EventDescription {
20    pub(crate) inner: *mut FMOD_STUDIO_EVENTDESCRIPTION,
21}
22
23unsafe impl Send for EventDescription {}
24unsafe impl Sync for EventDescription {}
25
26impl From<*mut FMOD_STUDIO_EVENTDESCRIPTION> for EventDescription {
27    fn from(inner: *mut FMOD_STUDIO_EVENTDESCRIPTION) -> Self {
28        Self { inner }
29    }
30}
31
32impl From<EventDescription> for *mut FMOD_STUDIO_EVENTDESCRIPTION {
33    fn from(value: EventDescription) -> Self {
34        value.inner
35    }
36}