1// Take a look at the license at the top of the repository in the LICENSE file.
23use crate::gobject_ffi;
45/// A structure that provides information to the type system which is
6/// used specifically for managing interface types.
7#[derive(Debug, Copy, Clone)]
8#[doc(alias = "GInterfaceInfo")]
9#[repr(transparent)]
10pub struct InterfaceInfo(pub(crate) gobject_ffi::GInterfaceInfo);
1112impl InterfaceInfo {
13// rustdoc-stripper-ignore-next
14/// Returns a `GInterfaceInfo` pointer.
15#[doc(hidden)]
16 #[inline]
17pub fn as_ptr(&self) -> *mut gobject_ffi::GInterfaceInfo {
18&self.0 as *const gobject_ffi::GInterfaceInfo as *mut _
19}
2021// rustdoc-stripper-ignore-next
22/// Borrows the underlying C value mutably.
23#[doc(hidden)]
24 #[inline]
25pub unsafe fn from_glib_ptr_borrow_mut<'a>(
26 ptr: *mut gobject_ffi::GInterfaceInfo,
27 ) -> &'a mut Self {
28&mut *(ptras *mut Self)
29 }
30}
3132impl Defaultfor InterfaceInfo {
33// rustdoc-stripper-ignore-next
34/// Creates a new InterfaceInfo with default value.
35fn default() -> Self {
36Self(gobject_ffi::GInterfaceInfo {
37 interface_init: None,
38 interface_finalize: None,
39 interface_data: ::std::ptr::null_mut(),
40 })
41 }
42}