1use crate::{RenderNodeType, RepeatNode};
4
5define_render_node!(
6 RepeatNode,
7 crate::ffi::GskRepeatNode,
8 RenderNodeType::RepeatNode
9);
10
11impl RepeatNode {
12 #[cfg(feature = "v4_24")]
19 #[cfg_attr(docsrs, doc(cfg(feature = "v4_24")))]
20 #[doc(alias = "gsk_repeat_node_get_child_snap")]
21 #[doc(alias = "get_child_snap")]
22 pub fn child_snap(&self) -> crate::RectSnap {
23 unsafe {
24 glib::translate::from_glib(crate::ffi::gsk_repeat_node_get_child_snap(
25 glib::translate::ToGlibPtr::to_glib_none(self).0,
26 ))
27 }
28 }
29
30 #[cfg(feature = "v4_24")]
36 #[cfg_attr(docsrs, doc(cfg(feature = "v4_24")))]
37 #[doc(alias = "gsk_repeat_node_get_snap")]
38 #[doc(alias = "get_snap")]
39 pub fn snap(&self) -> crate::RectSnap {
40 unsafe {
41 glib::translate::from_glib(crate::ffi::gsk_repeat_node_get_snap(
42 glib::translate::ToGlibPtr::to_glib_none(self).0,
43 ))
44 }
45 }
46}
47
48impl std::fmt::Debug for RepeatNode {
49 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
50 f.debug_struct("RepeatNode")
51 .field("child_bounds", &self.child_bounds())
52 .field("child", &self.child())
53 .finish()
54 }
55}