GraphApi

Struct GraphApi 

Source
#[repr(C)]
pub struct GraphApi {
Show 13 fields pub create_truth_types: Option<unsafe extern "C" fn(tt: *mut TheTruthO)>, pub create_graph: Option<unsafe extern "C" fn(allocator: *mut AllocatorI, tt: *mut TheTruthO, graph_id: TtIdT, node_interface_name: *const c_char, node_interface_version: VersionT, undo_stack: *mut UndoStackI, asset_root: TtIdT, settings_tt: *mut TheTruthO, settings_object: TtIdT) -> *mut GraphO>, pub destroy_graph: Option<unsafe extern "C" fn(graph: *mut GraphO, truth_already_destroyed: bool)>, pub set_settings_object: Option<unsafe extern "C" fn(graph: *mut GraphO, settings_tt: *mut TheTruthO, settings_object: TtIdT)>, pub id: Option<unsafe extern "C" fn(graph: *mut GraphO) -> TtIdT>, pub ui: Option<unsafe extern "C" fn(inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, rect: RectT, ui_root_id: u64) -> GraphUiResT>, pub menu: Option<unsafe extern "C" fn(inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, pos: Vec2T)>, pub selected_objects: Option<unsafe extern "C" fn(inst: *mut GraphO, ta: *mut TempAllocatorI) -> *const TtIdT>, pub refresh_node_types: Option<unsafe extern "C" fn(inst: *mut GraphO, node_interface_name: *const c_char, node_interface_version: VersionT)>, pub toolbars: Option<unsafe extern "C" fn(inst: *mut GraphO, ta: *mut TempAllocatorI) -> *mut ToolbarI>, pub migrate_to_connector_hash: Option<unsafe extern "C" fn(tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32, node_types: *const *const GraphNodeTypeI, num_node_types: u32) -> bool>, pub needs_migrate_to_connector_hash: Option<unsafe extern "C" fn(tt: *mut TheTruthO) -> bool>, pub migrate_to_instantiated_connections: Option<unsafe extern "C" fn(tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32) -> bool>,
}

Fields§

§create_truth_types: Option<unsafe extern "C" fn(tt: *mut TheTruthO)>§create_graph: Option<unsafe extern "C" fn(allocator: *mut AllocatorI, tt: *mut TheTruthO, graph_id: TtIdT, node_interface_name: *const c_char, node_interface_version: VersionT, undo_stack: *mut UndoStackI, asset_root: TtIdT, settings_tt: *mut TheTruthO, settings_object: TtIdT) -> *mut GraphO>§destroy_graph: Option<unsafe extern "C" fn(graph: *mut GraphO, truth_already_destroyed: bool)>§set_settings_object: Option<unsafe extern "C" fn(graph: *mut GraphO, settings_tt: *mut TheTruthO, settings_object: TtIdT)>§id: Option<unsafe extern "C" fn(graph: *mut GraphO) -> TtIdT>§ui: Option<unsafe extern "C" fn(inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, rect: RectT, ui_root_id: u64) -> GraphUiResT>§menu: Option<unsafe extern "C" fn(inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, pos: Vec2T)>§selected_objects: Option<unsafe extern "C" fn(inst: *mut GraphO, ta: *mut TempAllocatorI) -> *const TtIdT>§refresh_node_types: Option<unsafe extern "C" fn(inst: *mut GraphO, node_interface_name: *const c_char, node_interface_version: VersionT)>§toolbars: Option<unsafe extern "C" fn(inst: *mut GraphO, ta: *mut TempAllocatorI) -> *mut ToolbarI>§migrate_to_connector_hash: Option<unsafe extern "C" fn(tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32, node_types: *const *const GraphNodeTypeI, num_node_types: u32) -> bool>§needs_migrate_to_connector_hash: Option<unsafe extern "C" fn(tt: *mut TheTruthO) -> bool>§migrate_to_instantiated_connections: Option<unsafe extern "C" fn(tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32) -> bool>

Implementations§

Source§

impl GraphApi

Source

pub unsafe fn create_truth_types(&self, tt: *mut TheTruthO)

Source

pub unsafe fn create_graph( &self, allocator: *mut AllocatorI, tt: *mut TheTruthO, graph_id: TtIdT, node_interface_name: *const c_char, node_interface_version: VersionT, undo_stack: *mut UndoStackI, asset_root: TtIdT, settings_tt: *mut TheTruthO, settings_object: TtIdT, ) -> *mut GraphO

Source

pub unsafe fn destroy_graph( &self, graph: *mut GraphO, truth_already_destroyed: bool, )

Source

pub unsafe fn set_settings_object( &self, graph: *mut GraphO, settings_tt: *mut TheTruthO, settings_object: TtIdT, )

Source

pub unsafe fn id(&self, graph: *mut GraphO) -> TtIdT

Source

pub unsafe fn ui( &self, inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, rect: RectT, ui_root_id: u64, ) -> GraphUiResT

Source

pub unsafe fn menu( &self, inst: *mut GraphO, ui: *mut UiO, style: *const UiStyleT, pos: Vec2T, )

Source

pub unsafe fn selected_objects( &self, inst: *mut GraphO, ta: *mut TempAllocatorI, ) -> *const TtIdT

Source

pub unsafe fn refresh_node_types( &self, inst: *mut GraphO, node_interface_name: *const c_char, node_interface_version: VersionT, )

Source

pub unsafe fn toolbars( &self, inst: *mut GraphO, ta: *mut TempAllocatorI, ) -> *mut ToolbarI

Source

pub unsafe fn migrate_to_connector_hash( &self, tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32, node_types: *const *const GraphNodeTypeI, num_node_types: u32, ) -> bool

Source

pub unsafe fn needs_migrate_to_connector_hash(&self, tt: *mut TheTruthO) -> bool

Source

pub unsafe fn migrate_to_instantiated_connections( &self, tt: *mut TheTruthO, graphs: *mut TtIdT, num_graphs: u32, ) -> bool

Trait Implementations§

Source§

impl Api for GraphApi

Source§

impl Clone for GraphApi

Source§

fn clone(&self) -> GraphApi

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for GraphApi

Source§

fn default() -> GraphApi

Returns the “default value” for a type. Read more
Source§

impl Copy for GraphApi

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.