libxmlb/auto/
value_bindings.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::translate::*;
8
9glib::wrapper! {
10    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
11    pub struct ValueBindings(Boxed<ffi::XbValueBindings>);
12
13    match fn {
14        copy => |ptr| ffi::xb_value_bindings_copy(mut_override(ptr)),
15        free => |ptr| ffi::xb_value_bindings_free(ptr),
16        type_ => || ffi::xb_value_bindings_get_type(),
17    }
18}
19
20impl ValueBindings {
21    //#[doc(alias = "xb_value_bindings_bind_str")]
22    //pub fn bind_str(&mut self, idx: u32, str: glib::GString) {
23    //    unsafe { TODO: call ffi:xb_value_bindings_bind_str() }
24    //}
25
26    #[doc(alias = "xb_value_bindings_bind_val")]
27    pub fn bind_val(&mut self, idx: u32, val: u32) {
28        unsafe {
29            ffi::xb_value_bindings_bind_val(self.to_glib_none_mut().0, idx, val);
30        }
31    }
32
33    #[doc(alias = "xb_value_bindings_clear")]
34    pub fn clear(&mut self) {
35        unsafe {
36            ffi::xb_value_bindings_clear(self.to_glib_none_mut().0);
37        }
38    }
39
40    #[doc(alias = "xb_value_bindings_copy_binding")]
41    pub fn copy_binding(&mut self, idx: u32, dest: &mut ValueBindings, dest_idx: u32) -> bool {
42        unsafe {
43            from_glib(ffi::xb_value_bindings_copy_binding(
44                self.to_glib_none_mut().0,
45                idx,
46                dest.to_glib_none_mut().0,
47                dest_idx,
48            ))
49        }
50    }
51
52    #[doc(alias = "xb_value_bindings_init")]
53    pub fn init(&mut self) {
54        unsafe {
55            ffi::xb_value_bindings_init(self.to_glib_none_mut().0);
56        }
57    }
58
59    #[doc(alias = "xb_value_bindings_is_bound")]
60    pub fn is_bound(&mut self, idx: u32) -> bool {
61        unsafe {
62            from_glib(ffi::xb_value_bindings_is_bound(
63                self.to_glib_none_mut().0,
64                idx,
65            ))
66        }
67    }
68
69    //#[doc(alias = "xb_value_bindings_lookup_opcode")]
70    //pub fn lookup_opcode(&mut self, idx: u32, opcode_out: /*Ignored*/Opcode) -> bool {
71    //    unsafe { TODO: call ffi:xb_value_bindings_lookup_opcode() }
72    //}
73}