pub unsafe fn create_cpp_to_rust_project_state_context(
    callback_target: NonNull<Box<dyn ProjectStateContext>>
) -> NonNull<ProjectStateContext>
Expand description

Creates a ProjectStateContext object on C++ side and returns a pointer to it.

This function is provided because Rust structs can’t implement C++ virtual base classes.

Example

See create_cpp_to_rust_control_surface(). Usage is very similar.

Cleaning up

In order to avoid memory leaks, you must take care of removing the C++ counterpart ProjectStateContext by calling delete_cpp_project_state_context().

Safety

This function is highly unsafe. Better use the medium-level API instead.