gio/auto/property_action.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::{Action, ffi};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GPropertyAction")]
10 pub struct PropertyAction(Object<ffi::GPropertyAction>) @implements Action;
11
12 match fn {
13 type_ => || ffi::g_property_action_get_type(),
14 }
15}
16
17impl PropertyAction {
18 #[doc(alias = "g_property_action_new")]
19 pub fn new(name: &str, object: &impl IsA<glib::Object>, property_name: &str) -> PropertyAction {
20 unsafe {
21 from_glib_full(ffi::g_property_action_new(
22 name.to_glib_none().0,
23 object.as_ref().to_glib_none().0,
24 property_name.to_glib_none().0,
25 ))
26 }
27 }
28
29 #[doc(alias = "invert-boolean")]
30 pub fn inverts_boolean(&self) -> bool {
31 ObjectExt::property(self, "invert-boolean")
32 }
33}