1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// This file was generated by gir (6231689) from gir-files (0bcaef9)
// DO NOT EDIT
use ParamFlags;
use ffi;
use glib;
use glib::object::IsA;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use std::mem;
use std::ptr;
glib_wrapper! {
pub struct ParamSpec(Object<ffi::GParamSpec>);
match fn {
get_type => || ffi::intern(),
}
}
impl ParamSpec {
pub fn internal(param_type: glib::types::Type, name: &str, nick: &str, blurb: &str, flags: ParamFlags) -> Option<ParamSpec> {
unsafe {
from_glib_none(ffi::g_param_spec_internal(param_type.to_glib(), name.to_glib_none().0, nick.to_glib_none().0, blurb.to_glib_none().0, flags.to_glib()))
}
}
}
pub trait ParamSpecExt {
fn get_blurb(&self) -> Option<String>;
//#[cfg(any(feature = "v2_38", feature = "dox"))]
//fn get_default_value(&self) -> /*Ignored*/Option<Value>;
fn get_name(&self) -> Option<String>;
//#[cfg(any(feature = "v2_46", feature = "dox"))]
//fn get_name_quark(&self) -> /*Ignored*/glib::Quark;
fn get_nick(&self) -> Option<String>;
//fn get_qdata(&self, quark: /*Ignored*/glib::Quark) -> /*Unimplemented*/Option<Fundamental: Pointer>;
fn get_redirect_target(&self) -> Option<ParamSpec>;
fn ref_sink(&self) -> Option<ParamSpec>;
//fn set_qdata<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, quark: /*Ignored*/glib::Quark, data: P);
//fn set_qdata_full<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, quark: /*Ignored*/glib::Quark, data: P, destroy: /*Unknown conversion*//*Unimplemented*/DestroyNotify);
fn sink(&self);
//fn steal_qdata(&self, quark: /*Ignored*/glib::Quark) -> /*Unimplemented*/Option<Fundamental: Pointer>;
}
impl<O: IsA<ParamSpec>> ParamSpecExt for O {
fn get_blurb(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::g_param_spec_get_blurb(self.to_glib_none().0))
}
}
//#[cfg(any(feature = "v2_38", feature = "dox"))]
//fn get_default_value(&self) -> /*Ignored*/Option<Value> {
// unsafe { TODO: call ffi::g_param_spec_get_default_value() }
//}
fn get_name(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::g_param_spec_get_name(self.to_glib_none().0))
}
}
//#[cfg(any(feature = "v2_46", feature = "dox"))]
//fn get_name_quark(&self) -> /*Ignored*/glib::Quark {
// unsafe { TODO: call ffi::g_param_spec_get_name_quark() }
//}
fn get_nick(&self) -> Option<String> {
unsafe {
from_glib_none(ffi::g_param_spec_get_nick(self.to_glib_none().0))
}
}
//fn get_qdata(&self, quark: /*Ignored*/glib::Quark) -> /*Unimplemented*/Option<Fundamental: Pointer> {
// unsafe { TODO: call ffi::g_param_spec_get_qdata() }
//}
fn get_redirect_target(&self) -> Option<ParamSpec> {
unsafe {
from_glib_none(ffi::g_param_spec_get_redirect_target(self.to_glib_none().0))
}
}
fn ref_sink(&self) -> Option<ParamSpec> {
unsafe {
from_glib_none(ffi::g_param_spec_ref_sink(self.to_glib_none().0))
}
}
//fn set_qdata<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, quark: /*Ignored*/glib::Quark, data: P) {
// unsafe { TODO: call ffi::g_param_spec_set_qdata() }
//}
//fn set_qdata_full<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, quark: /*Ignored*/glib::Quark, data: P, destroy: /*Unknown conversion*//*Unimplemented*/DestroyNotify) {
// unsafe { TODO: call ffi::g_param_spec_set_qdata_full() }
//}
fn sink(&self) {
unsafe {
ffi::g_param_spec_sink(self.to_glib_none().0);
}
}
//fn steal_qdata(&self, quark: /*Ignored*/glib::Quark) -> /*Unimplemented*/Option<Fundamental: Pointer> {
// unsafe { TODO: call ffi::g_param_spec_steal_qdata() }
//}
}