1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-08-10 22:41:43 +02:00
This commit is contained in:
Anton Titovets
2024-12-09 10:51:01 +03:00
parent fbbb298fc3
commit 5cc73ed2c7
3 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
use addin1c::{Variant, ParamValue};
use crate::core::AddIn;
use crate::component::AddIn;
pub fn send_message(obj: &AddIn, params: &[Variant]) -> String {

View File

@@ -1,6 +1,7 @@
mod methods;
use addin1c::{name, Variant};
use crate::core::getset;
// МЕТОДЫ КОМПОНЕНТЫ -------------------------------------------------------------------------------
@@ -57,14 +58,14 @@ impl AddIn {
}
// Сюда просто нужно еще раз добавить имена полей
pub fn get_field_ptr<T>(&self, index: usize) -> *const T {
pub fn get_field_ptr(&self, index: usize) -> *const dyn getset::ValueType {
match index {
0 => &self.field1 as *const _,
1 => &self.field2 as *const _,
0 => &self.field1 as &dyn getset::ValueType as *const _,
1 => &self.field2 as &dyn getset::ValueType as *const _,
_ => panic!("Index out of bounds"),
}
}
pub fn get_field_ptr_mut<T>(&mut self, index: usize) -> *mut T { self.get_field_ptr(index) as *mut _ }
pub fn get_field_ptr_mut(&mut self, index: usize) -> *mut dyn getset::ValueType { self.get_field_ptr(index) as *mut _ }
}
// -------------------------------------------------------------------------------------------------

View File

@@ -7,7 +7,7 @@ use std::{
sync::atomic::{AtomicI32, Ordering},
};
use core::AddIn;
use component::AddIn;
use addin1c::{create_component, destroy_component, name, AttachType};
pub static mut PLATFORM_CAPABILITIES: AtomicI32 = AtomicI32::new(-1);