let cstr = CString::new(name).unwrap();
ui_add_action(self.ptr, cstr.as_ptr(), Some(action_event_wrapper::<T>), ptr as *mut c_void);
}
+
+ pub fn call_action(&self, action: &str) {
+ let cstr = CString::new(action).unwrap();
+ unsafe {
+ ui_call_action(self.ptr, cstr.as_ptr());
+ }
+ }
}
pub extern "C" fn destroy_boxed<T>(data: *mut c_void) {
}
pub fn call_action(&self, action: &str) {
- let cstr = CString::new(action).unwrap();
- unsafe {
- ui_call_action(self.ctx.ptr, cstr.as_ptr());
- }
+ self.ctx.call_action(action);
}
}