gtk4/auto/try_expression.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::ffi;
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 /// A [`Expression`][crate::Expression] that tries to evaluate each of its expressions until it succeeds.
10 ///
11 /// If all expressions fail to evaluate, the [`TryExpression`][crate::TryExpression]'s evaluation fails as well.
12 #[doc(alias = "GtkTryExpression")]
13 pub struct TryExpression(Shared<ffi::GtkTryExpression>);
14
15 match fn {
16 ref => |ptr| ffi::gtk_expression_ref(ptr as *mut ffi::GtkExpression),
17 unref => |ptr| ffi::gtk_expression_unref(ptr as *mut ffi::GtkExpression),
18 }
19}
20
21impl StaticType for TryExpression {
22 fn static_type() -> glib::Type {
23 unsafe { from_glib(ffi::gtk_try_expression_get_type()) }
24 }
25}
26
27impl TryExpression {}