1use const_cstr::{const_cstr, ConstCStr};
2use machinery::{identifier, Identifier};
3use machinery_api::{
4 foundation::{ApplicationO, VersionT},
5 plugins::ui::DockingFindTabOptT,
6 Api,
7};
8use tree_sitter::Language;
9
10#[repr(C)]
12pub struct AnodeApi {
13 pub open_asset: unsafe extern "C" fn(app: *mut ApplicationO, opt: *const DockingFindTabOptT),
18}
19
20unsafe impl Send for AnodeApi {}
21unsafe impl Sync for AnodeApi {}
22
23impl Api for AnodeApi {
24 const NAME: ConstCStr = const_cstr!("tm_anode_api");
25 const VERSION: VersionT = VersionT {
26 major: 0,
27 minor: 1,
28 patch: 0,
29 };
30}
31
32pub struct AnodeAspectI {
34 pub property: u32,
36 pub highlighting: *const Highlighting,
38}
39
40unsafe impl Send for AnodeAspectI {}
41unsafe impl Sync for AnodeAspectI {}
42
43pub const ASPECT_ANODE: Identifier = identifier!("tm_anode_aspect_i");
44
45pub struct Highlighting {
52 pub language: Language,
53 pub highlight_query: *const u8,
54 pub highlight_query_len: usize,
55 pub injection_query: *const u8,
56 pub injection_query_len: usize,
57 pub locals_query: *const u8,
58 pub locals_query_len: usize,
59}
60
61unsafe impl Send for Highlighting {}
62unsafe impl Sync for Highlighting {}