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 
5 use crate::Adjustment;
6 use crate::CellRenderer;
7 use crate::CellRendererMode;
8 use crate::CellRendererText;
9 use glib::object::Cast;
10 use glib::object::IsA;
11 use glib::signal::connect_raw;
12 use glib::signal::SignalHandlerId;
13 use glib::translate::*;
14 use glib::StaticType;
15 use glib::ToValue;
16 use std::boxed::Box as Box_;
17 use std::fmt;
18 use std::mem::transmute;
19 
20 glib::wrapper! {
21     #[doc(alias = "GtkCellRendererSpin")]
22     pub struct CellRendererSpin(Object<ffi::GtkCellRendererSpin, ffi::GtkCellRendererSpinClass>) @extends CellRendererText, CellRenderer;
23 
24     match fn {
25         type_ => || ffi::gtk_cell_renderer_spin_get_type(),
26     }
27 }
28 
29 impl CellRendererSpin {
30     #[doc(alias = "gtk_cell_renderer_spin_new")]
new() -> CellRendererSpin31     pub fn new() -> CellRendererSpin {
32         assert_initialized_main_thread!();
33         unsafe { CellRenderer::from_glib_none(ffi::gtk_cell_renderer_spin_new()).unsafe_cast() }
34     }
35 
36     // rustdoc-stripper-ignore-next
37     /// Creates a new builder-pattern struct instance to construct [`CellRendererSpin`] objects.
38     ///
39     /// This method returns an instance of [`CellRendererSpinBuilder`] which can be used to create [`CellRendererSpin`] objects.
builder() -> CellRendererSpinBuilder40     pub fn builder() -> CellRendererSpinBuilder {
41         CellRendererSpinBuilder::default()
42     }
43 }
44 
45 impl Default for CellRendererSpin {
default() -> Self46     fn default() -> Self {
47         Self::new()
48     }
49 }
50 
51 #[derive(Clone, Default)]
52 // rustdoc-stripper-ignore-next
53 /// A [builder-pattern] type to construct [`CellRendererSpin`] objects.
54 ///
55 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
56 pub struct CellRendererSpinBuilder {
57     adjustment: Option<Adjustment>,
58     climb_rate: Option<f64>,
59     digits: Option<u32>,
60     align_set: Option<bool>,
61     alignment: Option<pango::Alignment>,
62     attributes: Option<pango::AttrList>,
63     background: Option<String>,
64     background_rgba: Option<gdk::RGBA>,
65     background_set: Option<bool>,
66     editable: Option<bool>,
67     editable_set: Option<bool>,
68     ellipsize: Option<pango::EllipsizeMode>,
69     ellipsize_set: Option<bool>,
70     family: Option<String>,
71     family_set: Option<bool>,
72     font: Option<String>,
73     font_desc: Option<pango::FontDescription>,
74     foreground: Option<String>,
75     foreground_rgba: Option<gdk::RGBA>,
76     foreground_set: Option<bool>,
77     language: Option<String>,
78     language_set: Option<bool>,
79     markup: Option<String>,
80     max_width_chars: Option<i32>,
81     placeholder_text: Option<String>,
82     rise: Option<i32>,
83     rise_set: Option<bool>,
84     scale: Option<f64>,
85     scale_set: Option<bool>,
86     single_paragraph_mode: Option<bool>,
87     size: Option<i32>,
88     size_points: Option<f64>,
89     size_set: Option<bool>,
90     stretch: Option<pango::Stretch>,
91     stretch_set: Option<bool>,
92     strikethrough: Option<bool>,
93     strikethrough_set: Option<bool>,
94     style: Option<pango::Style>,
95     style_set: Option<bool>,
96     text: Option<String>,
97     underline: Option<pango::Underline>,
98     underline_set: Option<bool>,
99     variant: Option<pango::Variant>,
100     variant_set: Option<bool>,
101     weight: Option<i32>,
102     weight_set: Option<bool>,
103     width_chars: Option<i32>,
104     wrap_mode: Option<pango::WrapMode>,
105     wrap_width: Option<i32>,
106     cell_background: Option<String>,
107     cell_background_rgba: Option<gdk::RGBA>,
108     cell_background_set: Option<bool>,
109     height: Option<i32>,
110     is_expanded: Option<bool>,
111     is_expander: Option<bool>,
112     mode: Option<CellRendererMode>,
113     sensitive: Option<bool>,
114     visible: Option<bool>,
115     width: Option<i32>,
116     xalign: Option<f32>,
117     xpad: Option<u32>,
118     yalign: Option<f32>,
119     ypad: Option<u32>,
120 }
121 
122 impl CellRendererSpinBuilder {
123     // rustdoc-stripper-ignore-next
124     /// Create a new [`CellRendererSpinBuilder`].
new() -> Self125     pub fn new() -> Self {
126         Self::default()
127     }
128 
129     // rustdoc-stripper-ignore-next
130     /// Build the [`CellRendererSpin`].
build(self) -> CellRendererSpin131     pub fn build(self) -> CellRendererSpin {
132         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
133         if let Some(ref adjustment) = self.adjustment {
134             properties.push(("adjustment", adjustment));
135         }
136         if let Some(ref climb_rate) = self.climb_rate {
137             properties.push(("climb-rate", climb_rate));
138         }
139         if let Some(ref digits) = self.digits {
140             properties.push(("digits", digits));
141         }
142         if let Some(ref align_set) = self.align_set {
143             properties.push(("align-set", align_set));
144         }
145         if let Some(ref alignment) = self.alignment {
146             properties.push(("alignment", alignment));
147         }
148         if let Some(ref attributes) = self.attributes {
149             properties.push(("attributes", attributes));
150         }
151         if let Some(ref background) = self.background {
152             properties.push(("background", background));
153         }
154         if let Some(ref background_rgba) = self.background_rgba {
155             properties.push(("background-rgba", background_rgba));
156         }
157         if let Some(ref background_set) = self.background_set {
158             properties.push(("background-set", background_set));
159         }
160         if let Some(ref editable) = self.editable {
161             properties.push(("editable", editable));
162         }
163         if let Some(ref editable_set) = self.editable_set {
164             properties.push(("editable-set", editable_set));
165         }
166         if let Some(ref ellipsize) = self.ellipsize {
167             properties.push(("ellipsize", ellipsize));
168         }
169         if let Some(ref ellipsize_set) = self.ellipsize_set {
170             properties.push(("ellipsize-set", ellipsize_set));
171         }
172         if let Some(ref family) = self.family {
173             properties.push(("family", family));
174         }
175         if let Some(ref family_set) = self.family_set {
176             properties.push(("family-set", family_set));
177         }
178         if let Some(ref font) = self.font {
179             properties.push(("font", font));
180         }
181         if let Some(ref font_desc) = self.font_desc {
182             properties.push(("font-desc", font_desc));
183         }
184         if let Some(ref foreground) = self.foreground {
185             properties.push(("foreground", foreground));
186         }
187         if let Some(ref foreground_rgba) = self.foreground_rgba {
188             properties.push(("foreground-rgba", foreground_rgba));
189         }
190         if let Some(ref foreground_set) = self.foreground_set {
191             properties.push(("foreground-set", foreground_set));
192         }
193         if let Some(ref language) = self.language {
194             properties.push(("language", language));
195         }
196         if let Some(ref language_set) = self.language_set {
197             properties.push(("language-set", language_set));
198         }
199         if let Some(ref markup) = self.markup {
200             properties.push(("markup", markup));
201         }
202         if let Some(ref max_width_chars) = self.max_width_chars {
203             properties.push(("max-width-chars", max_width_chars));
204         }
205         if let Some(ref placeholder_text) = self.placeholder_text {
206             properties.push(("placeholder-text", placeholder_text));
207         }
208         if let Some(ref rise) = self.rise {
209             properties.push(("rise", rise));
210         }
211         if let Some(ref rise_set) = self.rise_set {
212             properties.push(("rise-set", rise_set));
213         }
214         if let Some(ref scale) = self.scale {
215             properties.push(("scale", scale));
216         }
217         if let Some(ref scale_set) = self.scale_set {
218             properties.push(("scale-set", scale_set));
219         }
220         if let Some(ref single_paragraph_mode) = self.single_paragraph_mode {
221             properties.push(("single-paragraph-mode", single_paragraph_mode));
222         }
223         if let Some(ref size) = self.size {
224             properties.push(("size", size));
225         }
226         if let Some(ref size_points) = self.size_points {
227             properties.push(("size-points", size_points));
228         }
229         if let Some(ref size_set) = self.size_set {
230             properties.push(("size-set", size_set));
231         }
232         if let Some(ref stretch) = self.stretch {
233             properties.push(("stretch", stretch));
234         }
235         if let Some(ref stretch_set) = self.stretch_set {
236             properties.push(("stretch-set", stretch_set));
237         }
238         if let Some(ref strikethrough) = self.strikethrough {
239             properties.push(("strikethrough", strikethrough));
240         }
241         if let Some(ref strikethrough_set) = self.strikethrough_set {
242             properties.push(("strikethrough-set", strikethrough_set));
243         }
244         if let Some(ref style) = self.style {
245             properties.push(("style", style));
246         }
247         if let Some(ref style_set) = self.style_set {
248             properties.push(("style-set", style_set));
249         }
250         if let Some(ref text) = self.text {
251             properties.push(("text", text));
252         }
253         if let Some(ref underline) = self.underline {
254             properties.push(("underline", underline));
255         }
256         if let Some(ref underline_set) = self.underline_set {
257             properties.push(("underline-set", underline_set));
258         }
259         if let Some(ref variant) = self.variant {
260             properties.push(("variant", variant));
261         }
262         if let Some(ref variant_set) = self.variant_set {
263             properties.push(("variant-set", variant_set));
264         }
265         if let Some(ref weight) = self.weight {
266             properties.push(("weight", weight));
267         }
268         if let Some(ref weight_set) = self.weight_set {
269             properties.push(("weight-set", weight_set));
270         }
271         if let Some(ref width_chars) = self.width_chars {
272             properties.push(("width-chars", width_chars));
273         }
274         if let Some(ref wrap_mode) = self.wrap_mode {
275             properties.push(("wrap-mode", wrap_mode));
276         }
277         if let Some(ref wrap_width) = self.wrap_width {
278             properties.push(("wrap-width", wrap_width));
279         }
280         if let Some(ref cell_background) = self.cell_background {
281             properties.push(("cell-background", cell_background));
282         }
283         if let Some(ref cell_background_rgba) = self.cell_background_rgba {
284             properties.push(("cell-background-rgba", cell_background_rgba));
285         }
286         if let Some(ref cell_background_set) = self.cell_background_set {
287             properties.push(("cell-background-set", cell_background_set));
288         }
289         if let Some(ref height) = self.height {
290             properties.push(("height", height));
291         }
292         if let Some(ref is_expanded) = self.is_expanded {
293             properties.push(("is-expanded", is_expanded));
294         }
295         if let Some(ref is_expander) = self.is_expander {
296             properties.push(("is-expander", is_expander));
297         }
298         if let Some(ref mode) = self.mode {
299             properties.push(("mode", mode));
300         }
301         if let Some(ref sensitive) = self.sensitive {
302             properties.push(("sensitive", sensitive));
303         }
304         if let Some(ref visible) = self.visible {
305             properties.push(("visible", visible));
306         }
307         if let Some(ref width) = self.width {
308             properties.push(("width", width));
309         }
310         if let Some(ref xalign) = self.xalign {
311             properties.push(("xalign", xalign));
312         }
313         if let Some(ref xpad) = self.xpad {
314             properties.push(("xpad", xpad));
315         }
316         if let Some(ref yalign) = self.yalign {
317             properties.push(("yalign", yalign));
318         }
319         if let Some(ref ypad) = self.ypad {
320             properties.push(("ypad", ypad));
321         }
322         glib::Object::new::<CellRendererSpin>(&properties)
323             .expect("Failed to create an instance of CellRendererSpin")
324     }
325 
adjustment<P: IsA<Adjustment>>(mut self, adjustment: &P) -> Self326     pub fn adjustment<P: IsA<Adjustment>>(mut self, adjustment: &P) -> Self {
327         self.adjustment = Some(adjustment.clone().upcast());
328         self
329     }
330 
climb_rate(mut self, climb_rate: f64) -> Self331     pub fn climb_rate(mut self, climb_rate: f64) -> Self {
332         self.climb_rate = Some(climb_rate);
333         self
334     }
335 
digits(mut self, digits: u32) -> Self336     pub fn digits(mut self, digits: u32) -> Self {
337         self.digits = Some(digits);
338         self
339     }
340 
align_set(mut self, align_set: bool) -> Self341     pub fn align_set(mut self, align_set: bool) -> Self {
342         self.align_set = Some(align_set);
343         self
344     }
345 
alignment(mut self, alignment: pango::Alignment) -> Self346     pub fn alignment(mut self, alignment: pango::Alignment) -> Self {
347         self.alignment = Some(alignment);
348         self
349     }
350 
attributes(mut self, attributes: &pango::AttrList) -> Self351     pub fn attributes(mut self, attributes: &pango::AttrList) -> Self {
352         self.attributes = Some(attributes.clone());
353         self
354     }
355 
background(mut self, background: &str) -> Self356     pub fn background(mut self, background: &str) -> Self {
357         self.background = Some(background.to_string());
358         self
359     }
360 
background_rgba(mut self, background_rgba: &gdk::RGBA) -> Self361     pub fn background_rgba(mut self, background_rgba: &gdk::RGBA) -> Self {
362         self.background_rgba = Some(background_rgba.clone());
363         self
364     }
365 
background_set(mut self, background_set: bool) -> Self366     pub fn background_set(mut self, background_set: bool) -> Self {
367         self.background_set = Some(background_set);
368         self
369     }
370 
editable(mut self, editable: bool) -> Self371     pub fn editable(mut self, editable: bool) -> Self {
372         self.editable = Some(editable);
373         self
374     }
375 
editable_set(mut self, editable_set: bool) -> Self376     pub fn editable_set(mut self, editable_set: bool) -> Self {
377         self.editable_set = Some(editable_set);
378         self
379     }
380 
ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self381     pub fn ellipsize(mut self, ellipsize: pango::EllipsizeMode) -> Self {
382         self.ellipsize = Some(ellipsize);
383         self
384     }
385 
ellipsize_set(mut self, ellipsize_set: bool) -> Self386     pub fn ellipsize_set(mut self, ellipsize_set: bool) -> Self {
387         self.ellipsize_set = Some(ellipsize_set);
388         self
389     }
390 
family(mut self, family: &str) -> Self391     pub fn family(mut self, family: &str) -> Self {
392         self.family = Some(family.to_string());
393         self
394     }
395 
family_set(mut self, family_set: bool) -> Self396     pub fn family_set(mut self, family_set: bool) -> Self {
397         self.family_set = Some(family_set);
398         self
399     }
400 
font(mut self, font: &str) -> Self401     pub fn font(mut self, font: &str) -> Self {
402         self.font = Some(font.to_string());
403         self
404     }
405 
font_desc(mut self, font_desc: &pango::FontDescription) -> Self406     pub fn font_desc(mut self, font_desc: &pango::FontDescription) -> Self {
407         self.font_desc = Some(font_desc.clone());
408         self
409     }
410 
foreground(mut self, foreground: &str) -> Self411     pub fn foreground(mut self, foreground: &str) -> Self {
412         self.foreground = Some(foreground.to_string());
413         self
414     }
415 
foreground_rgba(mut self, foreground_rgba: &gdk::RGBA) -> Self416     pub fn foreground_rgba(mut self, foreground_rgba: &gdk::RGBA) -> Self {
417         self.foreground_rgba = Some(foreground_rgba.clone());
418         self
419     }
420 
foreground_set(mut self, foreground_set: bool) -> Self421     pub fn foreground_set(mut self, foreground_set: bool) -> Self {
422         self.foreground_set = Some(foreground_set);
423         self
424     }
425 
language(mut self, language: &str) -> Self426     pub fn language(mut self, language: &str) -> Self {
427         self.language = Some(language.to_string());
428         self
429     }
430 
language_set(mut self, language_set: bool) -> Self431     pub fn language_set(mut self, language_set: bool) -> Self {
432         self.language_set = Some(language_set);
433         self
434     }
435 
markup(mut self, markup: &str) -> Self436     pub fn markup(mut self, markup: &str) -> Self {
437         self.markup = Some(markup.to_string());
438         self
439     }
440 
max_width_chars(mut self, max_width_chars: i32) -> Self441     pub fn max_width_chars(mut self, max_width_chars: i32) -> Self {
442         self.max_width_chars = Some(max_width_chars);
443         self
444     }
445 
placeholder_text(mut self, placeholder_text: &str) -> Self446     pub fn placeholder_text(mut self, placeholder_text: &str) -> Self {
447         self.placeholder_text = Some(placeholder_text.to_string());
448         self
449     }
450 
rise(mut self, rise: i32) -> Self451     pub fn rise(mut self, rise: i32) -> Self {
452         self.rise = Some(rise);
453         self
454     }
455 
rise_set(mut self, rise_set: bool) -> Self456     pub fn rise_set(mut self, rise_set: bool) -> Self {
457         self.rise_set = Some(rise_set);
458         self
459     }
460 
scale(mut self, scale: f64) -> Self461     pub fn scale(mut self, scale: f64) -> Self {
462         self.scale = Some(scale);
463         self
464     }
465 
scale_set(mut self, scale_set: bool) -> Self466     pub fn scale_set(mut self, scale_set: bool) -> Self {
467         self.scale_set = Some(scale_set);
468         self
469     }
470 
single_paragraph_mode(mut self, single_paragraph_mode: bool) -> Self471     pub fn single_paragraph_mode(mut self, single_paragraph_mode: bool) -> Self {
472         self.single_paragraph_mode = Some(single_paragraph_mode);
473         self
474     }
475 
size(mut self, size: i32) -> Self476     pub fn size(mut self, size: i32) -> Self {
477         self.size = Some(size);
478         self
479     }
480 
size_points(mut self, size_points: f64) -> Self481     pub fn size_points(mut self, size_points: f64) -> Self {
482         self.size_points = Some(size_points);
483         self
484     }
485 
size_set(mut self, size_set: bool) -> Self486     pub fn size_set(mut self, size_set: bool) -> Self {
487         self.size_set = Some(size_set);
488         self
489     }
490 
stretch(mut self, stretch: pango::Stretch) -> Self491     pub fn stretch(mut self, stretch: pango::Stretch) -> Self {
492         self.stretch = Some(stretch);
493         self
494     }
495 
stretch_set(mut self, stretch_set: bool) -> Self496     pub fn stretch_set(mut self, stretch_set: bool) -> Self {
497         self.stretch_set = Some(stretch_set);
498         self
499     }
500 
strikethrough(mut self, strikethrough: bool) -> Self501     pub fn strikethrough(mut self, strikethrough: bool) -> Self {
502         self.strikethrough = Some(strikethrough);
503         self
504     }
505 
strikethrough_set(mut self, strikethrough_set: bool) -> Self506     pub fn strikethrough_set(mut self, strikethrough_set: bool) -> Self {
507         self.strikethrough_set = Some(strikethrough_set);
508         self
509     }
510 
style(mut self, style: pango::Style) -> Self511     pub fn style(mut self, style: pango::Style) -> Self {
512         self.style = Some(style);
513         self
514     }
515 
style_set(mut self, style_set: bool) -> Self516     pub fn style_set(mut self, style_set: bool) -> Self {
517         self.style_set = Some(style_set);
518         self
519     }
520 
text(mut self, text: &str) -> Self521     pub fn text(mut self, text: &str) -> Self {
522         self.text = Some(text.to_string());
523         self
524     }
525 
underline(mut self, underline: pango::Underline) -> Self526     pub fn underline(mut self, underline: pango::Underline) -> Self {
527         self.underline = Some(underline);
528         self
529     }
530 
underline_set(mut self, underline_set: bool) -> Self531     pub fn underline_set(mut self, underline_set: bool) -> Self {
532         self.underline_set = Some(underline_set);
533         self
534     }
535 
variant(mut self, variant: pango::Variant) -> Self536     pub fn variant(mut self, variant: pango::Variant) -> Self {
537         self.variant = Some(variant);
538         self
539     }
540 
variant_set(mut self, variant_set: bool) -> Self541     pub fn variant_set(mut self, variant_set: bool) -> Self {
542         self.variant_set = Some(variant_set);
543         self
544     }
545 
weight(mut self, weight: i32) -> Self546     pub fn weight(mut self, weight: i32) -> Self {
547         self.weight = Some(weight);
548         self
549     }
550 
weight_set(mut self, weight_set: bool) -> Self551     pub fn weight_set(mut self, weight_set: bool) -> Self {
552         self.weight_set = Some(weight_set);
553         self
554     }
555 
width_chars(mut self, width_chars: i32) -> Self556     pub fn width_chars(mut self, width_chars: i32) -> Self {
557         self.width_chars = Some(width_chars);
558         self
559     }
560 
wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self561     pub fn wrap_mode(mut self, wrap_mode: pango::WrapMode) -> Self {
562         self.wrap_mode = Some(wrap_mode);
563         self
564     }
565 
wrap_width(mut self, wrap_width: i32) -> Self566     pub fn wrap_width(mut self, wrap_width: i32) -> Self {
567         self.wrap_width = Some(wrap_width);
568         self
569     }
570 
cell_background(mut self, cell_background: &str) -> Self571     pub fn cell_background(mut self, cell_background: &str) -> Self {
572         self.cell_background = Some(cell_background.to_string());
573         self
574     }
575 
cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self576     pub fn cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self {
577         self.cell_background_rgba = Some(cell_background_rgba.clone());
578         self
579     }
580 
cell_background_set(mut self, cell_background_set: bool) -> Self581     pub fn cell_background_set(mut self, cell_background_set: bool) -> Self {
582         self.cell_background_set = Some(cell_background_set);
583         self
584     }
585 
height(mut self, height: i32) -> Self586     pub fn height(mut self, height: i32) -> Self {
587         self.height = Some(height);
588         self
589     }
590 
is_expanded(mut self, is_expanded: bool) -> Self591     pub fn is_expanded(mut self, is_expanded: bool) -> Self {
592         self.is_expanded = Some(is_expanded);
593         self
594     }
595 
is_expander(mut self, is_expander: bool) -> Self596     pub fn is_expander(mut self, is_expander: bool) -> Self {
597         self.is_expander = Some(is_expander);
598         self
599     }
600 
mode(mut self, mode: CellRendererMode) -> Self601     pub fn mode(mut self, mode: CellRendererMode) -> Self {
602         self.mode = Some(mode);
603         self
604     }
605 
sensitive(mut self, sensitive: bool) -> Self606     pub fn sensitive(mut self, sensitive: bool) -> Self {
607         self.sensitive = Some(sensitive);
608         self
609     }
610 
visible(mut self, visible: bool) -> Self611     pub fn visible(mut self, visible: bool) -> Self {
612         self.visible = Some(visible);
613         self
614     }
615 
width(mut self, width: i32) -> Self616     pub fn width(mut self, width: i32) -> Self {
617         self.width = Some(width);
618         self
619     }
620 
xalign(mut self, xalign: f32) -> Self621     pub fn xalign(mut self, xalign: f32) -> Self {
622         self.xalign = Some(xalign);
623         self
624     }
625 
xpad(mut self, xpad: u32) -> Self626     pub fn xpad(mut self, xpad: u32) -> Self {
627         self.xpad = Some(xpad);
628         self
629     }
630 
yalign(mut self, yalign: f32) -> Self631     pub fn yalign(mut self, yalign: f32) -> Self {
632         self.yalign = Some(yalign);
633         self
634     }
635 
ypad(mut self, ypad: u32) -> Self636     pub fn ypad(mut self, ypad: u32) -> Self {
637         self.ypad = Some(ypad);
638         self
639     }
640 }
641 
642 pub const NONE_CELL_RENDERER_SPIN: Option<&CellRendererSpin> = None;
643 
644 pub trait CellRendererSpinExt: 'static {
adjustment(&self) -> Option<Adjustment>645     fn adjustment(&self) -> Option<Adjustment>;
646 
set_adjustment<P: IsA<Adjustment>>(&self, adjustment: Option<&P>)647     fn set_adjustment<P: IsA<Adjustment>>(&self, adjustment: Option<&P>);
648 
649     #[doc(alias = "climb-rate")]
climb_rate(&self) -> f64650     fn climb_rate(&self) -> f64;
651 
652     #[doc(alias = "climb-rate")]
set_climb_rate(&self, climb_rate: f64)653     fn set_climb_rate(&self, climb_rate: f64);
654 
digits(&self) -> u32655     fn digits(&self) -> u32;
656 
set_digits(&self, digits: u32)657     fn set_digits(&self, digits: u32);
658 
659     #[doc(alias = "adjustment")]
connect_adjustment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId660     fn connect_adjustment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
661 
662     #[doc(alias = "climb-rate")]
connect_climb_rate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId663     fn connect_climb_rate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
664 
665     #[doc(alias = "digits")]
connect_digits_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId666     fn connect_digits_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
667 }
668 
669 impl<O: IsA<CellRendererSpin>> CellRendererSpinExt for O {
adjustment(&self) -> Option<Adjustment>670     fn adjustment(&self) -> Option<Adjustment> {
671         unsafe {
672             let mut value = glib::Value::from_type(<Adjustment as StaticType>::static_type());
673             glib::gobject_ffi::g_object_get_property(
674                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
675                 b"adjustment\0".as_ptr() as *const _,
676                 value.to_glib_none_mut().0,
677             );
678             value
679                 .get()
680                 .expect("Return Value for property `adjustment` getter")
681         }
682     }
683 
set_adjustment<P: IsA<Adjustment>>(&self, adjustment: Option<&P>)684     fn set_adjustment<P: IsA<Adjustment>>(&self, adjustment: Option<&P>) {
685         unsafe {
686             glib::gobject_ffi::g_object_set_property(
687                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
688                 b"adjustment\0".as_ptr() as *const _,
689                 adjustment.to_value().to_glib_none().0,
690             );
691         }
692     }
693 
climb_rate(&self) -> f64694     fn climb_rate(&self) -> f64 {
695         unsafe {
696             let mut value = glib::Value::from_type(<f64 as StaticType>::static_type());
697             glib::gobject_ffi::g_object_get_property(
698                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
699                 b"climb-rate\0".as_ptr() as *const _,
700                 value.to_glib_none_mut().0,
701             );
702             value
703                 .get()
704                 .expect("Return Value for property `climb-rate` getter")
705         }
706     }
707 
set_climb_rate(&self, climb_rate: f64)708     fn set_climb_rate(&self, climb_rate: f64) {
709         unsafe {
710             glib::gobject_ffi::g_object_set_property(
711                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
712                 b"climb-rate\0".as_ptr() as *const _,
713                 climb_rate.to_value().to_glib_none().0,
714             );
715         }
716     }
717 
digits(&self) -> u32718     fn digits(&self) -> u32 {
719         unsafe {
720             let mut value = glib::Value::from_type(<u32 as StaticType>::static_type());
721             glib::gobject_ffi::g_object_get_property(
722                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
723                 b"digits\0".as_ptr() as *const _,
724                 value.to_glib_none_mut().0,
725             );
726             value
727                 .get()
728                 .expect("Return Value for property `digits` getter")
729         }
730     }
731 
set_digits(&self, digits: u32)732     fn set_digits(&self, digits: u32) {
733         unsafe {
734             glib::gobject_ffi::g_object_set_property(
735                 self.to_glib_none().0 as *mut glib::gobject_ffi::GObject,
736                 b"digits\0".as_ptr() as *const _,
737                 digits.to_value().to_glib_none().0,
738             );
739         }
740     }
741 
connect_adjustment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId742     fn connect_adjustment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
743         unsafe extern "C" fn notify_adjustment_trampoline<
744             P: IsA<CellRendererSpin>,
745             F: Fn(&P) + 'static,
746         >(
747             this: *mut ffi::GtkCellRendererSpin,
748             _param_spec: glib::ffi::gpointer,
749             f: glib::ffi::gpointer,
750         ) {
751             let f: &F = &*(f as *const F);
752             f(CellRendererSpin::from_glib_borrow(this).unsafe_cast_ref())
753         }
754         unsafe {
755             let f: Box_<F> = Box_::new(f);
756             connect_raw(
757                 self.as_ptr() as *mut _,
758                 b"notify::adjustment\0".as_ptr() as *const _,
759                 Some(transmute::<_, unsafe extern "C" fn()>(
760                     notify_adjustment_trampoline::<Self, F> as *const (),
761                 )),
762                 Box_::into_raw(f),
763             )
764         }
765     }
766 
connect_climb_rate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId767     fn connect_climb_rate_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
768         unsafe extern "C" fn notify_climb_rate_trampoline<
769             P: IsA<CellRendererSpin>,
770             F: Fn(&P) + 'static,
771         >(
772             this: *mut ffi::GtkCellRendererSpin,
773             _param_spec: glib::ffi::gpointer,
774             f: glib::ffi::gpointer,
775         ) {
776             let f: &F = &*(f as *const F);
777             f(CellRendererSpin::from_glib_borrow(this).unsafe_cast_ref())
778         }
779         unsafe {
780             let f: Box_<F> = Box_::new(f);
781             connect_raw(
782                 self.as_ptr() as *mut _,
783                 b"notify::climb-rate\0".as_ptr() as *const _,
784                 Some(transmute::<_, unsafe extern "C" fn()>(
785                     notify_climb_rate_trampoline::<Self, F> as *const (),
786                 )),
787                 Box_::into_raw(f),
788             )
789         }
790     }
791 
connect_digits_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId792     fn connect_digits_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
793         unsafe extern "C" fn notify_digits_trampoline<
794             P: IsA<CellRendererSpin>,
795             F: Fn(&P) + 'static,
796         >(
797             this: *mut ffi::GtkCellRendererSpin,
798             _param_spec: glib::ffi::gpointer,
799             f: glib::ffi::gpointer,
800         ) {
801             let f: &F = &*(f as *const F);
802             f(CellRendererSpin::from_glib_borrow(this).unsafe_cast_ref())
803         }
804         unsafe {
805             let f: Box_<F> = Box_::new(f);
806             connect_raw(
807                 self.as_ptr() as *mut _,
808                 b"notify::digits\0".as_ptr() as *const _,
809                 Some(transmute::<_, unsafe extern "C" fn()>(
810                     notify_digits_trampoline::<Self, F> as *const (),
811                 )),
812                 Box_::into_raw(f),
813             )
814         }
815     }
816 }
817 
818 impl fmt::Display for CellRendererSpin {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result819     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
820         f.write_str("CellRendererSpin")
821     }
822 }
823