wxrust_base/generated/
methods.rs1use std::os::raw::c_void;
2
3pub trait WxRustMethods {
4 type Unowned;
5 unsafe fn as_ptr(&self) -> *mut c_void;
6 unsafe fn from_ptr(ptr: *mut c_void) -> Self;
7 unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned;
8 unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F);
9 unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>
10 where
11 Self: Sized,
12 {
13 if ptr.is_null() {
14 None
15 } else {
16 Some(Self::from_unowned_ptr(ptr))
17 }
18 }
19}
20
21pub use super::methods_c::*;
22pub use super::methods_d::*;
23pub use super::methods_e::*;
24pub use super::methods_f::*;
25pub use super::methods_m::*;
26pub use super::methods_o::*;
27pub use super::methods_r::*;
28pub use super::methods_s::*;
29pub use super::methods_t::*;
30pub use super::methods_v::*;