From d53ab67c78531f32d2f92acb8a3293cbf86bad39 Mon Sep 17 00:00:00 2001 From: Adamaq01 Date: Sun, 16 Jul 2023 03:08:30 +0200 Subject: [PATCH] feat: add useless avs2 method binding --- src/sys.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/sys.rs b/src/sys.rs index adcaf55..fd03935 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -1,5 +1,13 @@ #![allow(dead_code)] +#[derive(Debug, Copy, Clone)] +#[repr(C)] +pub enum NodeData { + Int(i32), + Float(f32), + Pointer(*const u8), +} + #[crochet::load("avs2-core.dll")] extern "C" { #[symbol("XCgsqzn0000091")] @@ -12,6 +20,16 @@ extern "C" { pub fn property_query_size(property: *const ()) -> i32; #[symbol("XCgsqzn00000a1")] pub fn property_search(property: *const (), node: *const (), path: *const u8) -> *mut (); + #[symbol("XCgsqzn00000a2")] + pub fn property_node_create( + property: *mut (), + node: *mut (), + node_type: NodeType, + path: *const u8, + data: NodeData, + ) -> *mut (); + #[symbol("XCgsqzn00000a3")] + pub fn property_node_remove(node: *mut ()) -> i32; #[symbol("XCgsqzn00000a7")] pub fn property_node_name(node: *const (), buffer: *mut u8, size: u32) -> i32; #[symbol("XCgsqzn00000ab")]