1use glib::translate::*;
2use std::mem;
3
4#[repr(C)]
5#[derive(Clone, Copy, Debug, PartialEq)]
6pub struct VertexP2T2C4 {
7 pub x: f32,
8 pub y: f32,
9 pub s: f32,
10 pub t: f32,
11 pub r: u8,
12 pub g: u8,
13 pub b: u8,
14 pub a: u8,
15}
16
17#[doc(hidden)]
18impl Uninitialized for VertexP2T2C4 {
19 #[inline]
20 unsafe fn uninitialized() -> Self {
21 mem::zeroed()
22 }
23}
24
25#[doc(hidden)]
26impl<'a> ToGlibPtr<'a, *const ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
27 type Storage = &'a Self;
28
29 #[inline]
30 fn to_glib_none(&'a self) -> Stash<'a, *const ffi::CoglVertexP2T2C4, Self> {
31 let ptr: *const VertexP2T2C4 = &*self;
32 Stash(ptr as *const ffi::CoglVertexP2T2C4, self)
33 }
34}
35
36#[doc(hidden)]
37impl<'a> ToGlibPtrMut<'a, *mut ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
38 type Storage = &'a mut Self;
39
40 #[inline]
41 fn to_glib_none_mut(&'a mut self) -> StashMut<'a, *mut ffi::CoglVertexP2T2C4, Self> {
42 let ptr: *mut VertexP2T2C4 = &mut *self;
43 StashMut(ptr as *mut ffi::CoglVertexP2T2C4, self)
44 }
45}
46
47#[doc(hidden)]
48impl FromGlibPtrNone<*const ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
49 unsafe fn from_glib_none(ptr: *const ffi::CoglVertexP2T2C4) -> Self {
50 *(ptr as *const VertexP2T2C4)
51 }
52}
53
54#[doc(hidden)]
55impl FromGlibPtrNone<*mut ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
56 unsafe fn from_glib_none(ptr: *mut ffi::CoglVertexP2T2C4) -> Self {
57 *(ptr as *mut VertexP2T2C4)
58 }
59}
60
61#[doc(hidden)]
62impl FromGlibPtrBorrow<*mut ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
63 unsafe fn from_glib_borrow(ptr: *mut ffi::CoglVertexP2T2C4) -> glib::translate::Borrowed<Self> {
64 glib::translate::Borrowed::new(*(ptr as *mut VertexP2T2C4))
65 }
66}
67
68#[doc(hidden)]
69impl FromGlibPtrBorrow<*const ffi::CoglVertexP2T2C4> for VertexP2T2C4 {
70 unsafe fn from_glib_borrow(
71 ptr: *const ffi::CoglVertexP2T2C4,
72 ) -> glib::translate::Borrowed<Self> {
73 glib::translate::Borrowed::new(*(ptr as *const VertexP2T2C4))
74 }
75}