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 gdk;
6 use gdk_pixbuf;
7 use gio;
8 use glib::object::Cast;
9 use glib::object::IsA;
10 use glib::signal::connect_raw;
11 use glib::signal::SignalHandlerId;
12 use glib::translate::*;
13 use glib::value::SetValueOptional;
14 use glib::GString;
15 use glib::StaticType;
16 use glib::ToValue;
17 use glib::Value;
18 use glib_sys;
19 use gobject_sys;
20 use gtk_sys;
21 use std::boxed::Box as Box_;
22 use std::fmt;
23 use std::mem::transmute;
24 use CellRenderer;
25 use CellRendererMode;
26 
27 glib_wrapper! {
28     pub struct CellRendererPixbuf(Object<gtk_sys::GtkCellRendererPixbuf, gtk_sys::GtkCellRendererPixbufClass, CellRendererPixbufClass>) @extends CellRenderer;
29 
30     match fn {
31         get_type => || gtk_sys::gtk_cell_renderer_pixbuf_get_type(),
32     }
33 }
34 
35 impl CellRendererPixbuf {
new() -> CellRendererPixbuf36     pub fn new() -> CellRendererPixbuf {
37         assert_initialized_main_thread!();
38         unsafe {
39             CellRenderer::from_glib_none(gtk_sys::gtk_cell_renderer_pixbuf_new()).unsafe_cast()
40         }
41     }
42 }
43 
44 impl Default for CellRendererPixbuf {
default() -> Self45     fn default() -> Self {
46         Self::new()
47     }
48 }
49 
50 #[derive(Clone, Default)]
51 pub struct CellRendererPixbufBuilder {
52     follow_state: Option<bool>,
53     gicon: Option<gio::Icon>,
54     icon_name: Option<String>,
55     pixbuf: Option<gdk_pixbuf::Pixbuf>,
56     pixbuf_expander_closed: Option<gdk_pixbuf::Pixbuf>,
57     pixbuf_expander_open: Option<gdk_pixbuf::Pixbuf>,
58     stock_detail: Option<String>,
59     stock_size: Option<u32>,
60     cell_background: Option<String>,
61     cell_background_rgba: Option<gdk::RGBA>,
62     cell_background_set: Option<bool>,
63     height: Option<i32>,
64     is_expanded: Option<bool>,
65     is_expander: Option<bool>,
66     mode: Option<CellRendererMode>,
67     sensitive: Option<bool>,
68     visible: Option<bool>,
69     width: Option<i32>,
70     xalign: Option<f32>,
71     xpad: Option<u32>,
72     yalign: Option<f32>,
73     ypad: Option<u32>,
74 }
75 
76 impl CellRendererPixbufBuilder {
new() -> Self77     pub fn new() -> Self {
78         Self::default()
79     }
80 
build(self) -> CellRendererPixbuf81     pub fn build(self) -> CellRendererPixbuf {
82         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
83         if let Some(ref follow_state) = self.follow_state {
84             properties.push(("follow-state", follow_state));
85         }
86         if let Some(ref gicon) = self.gicon {
87             properties.push(("gicon", gicon));
88         }
89         if let Some(ref icon_name) = self.icon_name {
90             properties.push(("icon-name", icon_name));
91         }
92         if let Some(ref pixbuf) = self.pixbuf {
93             properties.push(("pixbuf", pixbuf));
94         }
95         if let Some(ref pixbuf_expander_closed) = self.pixbuf_expander_closed {
96             properties.push(("pixbuf-expander-closed", pixbuf_expander_closed));
97         }
98         if let Some(ref pixbuf_expander_open) = self.pixbuf_expander_open {
99             properties.push(("pixbuf-expander-open", pixbuf_expander_open));
100         }
101         if let Some(ref stock_detail) = self.stock_detail {
102             properties.push(("stock-detail", stock_detail));
103         }
104         if let Some(ref stock_size) = self.stock_size {
105             properties.push(("stock-size", stock_size));
106         }
107         if let Some(ref cell_background) = self.cell_background {
108             properties.push(("cell-background", cell_background));
109         }
110         if let Some(ref cell_background_rgba) = self.cell_background_rgba {
111             properties.push(("cell-background-rgba", cell_background_rgba));
112         }
113         if let Some(ref cell_background_set) = self.cell_background_set {
114             properties.push(("cell-background-set", cell_background_set));
115         }
116         if let Some(ref height) = self.height {
117             properties.push(("height", height));
118         }
119         if let Some(ref is_expanded) = self.is_expanded {
120             properties.push(("is-expanded", is_expanded));
121         }
122         if let Some(ref is_expander) = self.is_expander {
123             properties.push(("is-expander", is_expander));
124         }
125         if let Some(ref mode) = self.mode {
126             properties.push(("mode", mode));
127         }
128         if let Some(ref sensitive) = self.sensitive {
129             properties.push(("sensitive", sensitive));
130         }
131         if let Some(ref visible) = self.visible {
132             properties.push(("visible", visible));
133         }
134         if let Some(ref width) = self.width {
135             properties.push(("width", width));
136         }
137         if let Some(ref xalign) = self.xalign {
138             properties.push(("xalign", xalign));
139         }
140         if let Some(ref xpad) = self.xpad {
141             properties.push(("xpad", xpad));
142         }
143         if let Some(ref yalign) = self.yalign {
144             properties.push(("yalign", yalign));
145         }
146         if let Some(ref ypad) = self.ypad {
147             properties.push(("ypad", ypad));
148         }
149         glib::Object::new(CellRendererPixbuf::static_type(), &properties)
150             .expect("object new")
151             .downcast()
152             .expect("downcast")
153     }
154 
follow_state(mut self, follow_state: bool) -> Self155     pub fn follow_state(mut self, follow_state: bool) -> Self {
156         self.follow_state = Some(follow_state);
157         self
158     }
159 
gicon<P: IsA<gio::Icon>>(mut self, gicon: &P) -> Self160     pub fn gicon<P: IsA<gio::Icon>>(mut self, gicon: &P) -> Self {
161         self.gicon = Some(gicon.clone().upcast());
162         self
163     }
164 
icon_name(mut self, icon_name: &str) -> Self165     pub fn icon_name(mut self, icon_name: &str) -> Self {
166         self.icon_name = Some(icon_name.to_string());
167         self
168     }
169 
pixbuf(mut self, pixbuf: &gdk_pixbuf::Pixbuf) -> Self170     pub fn pixbuf(mut self, pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
171         self.pixbuf = Some(pixbuf.clone());
172         self
173     }
174 
pixbuf_expander_closed(mut self, pixbuf_expander_closed: &gdk_pixbuf::Pixbuf) -> Self175     pub fn pixbuf_expander_closed(mut self, pixbuf_expander_closed: &gdk_pixbuf::Pixbuf) -> Self {
176         self.pixbuf_expander_closed = Some(pixbuf_expander_closed.clone());
177         self
178     }
179 
pixbuf_expander_open(mut self, pixbuf_expander_open: &gdk_pixbuf::Pixbuf) -> Self180     pub fn pixbuf_expander_open(mut self, pixbuf_expander_open: &gdk_pixbuf::Pixbuf) -> Self {
181         self.pixbuf_expander_open = Some(pixbuf_expander_open.clone());
182         self
183     }
184 
stock_detail(mut self, stock_detail: &str) -> Self185     pub fn stock_detail(mut self, stock_detail: &str) -> Self {
186         self.stock_detail = Some(stock_detail.to_string());
187         self
188     }
189 
stock_size(mut self, stock_size: u32) -> Self190     pub fn stock_size(mut self, stock_size: u32) -> Self {
191         self.stock_size = Some(stock_size);
192         self
193     }
194 
cell_background(mut self, cell_background: &str) -> Self195     pub fn cell_background(mut self, cell_background: &str) -> Self {
196         self.cell_background = Some(cell_background.to_string());
197         self
198     }
199 
cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self200     pub fn cell_background_rgba(mut self, cell_background_rgba: &gdk::RGBA) -> Self {
201         self.cell_background_rgba = Some(cell_background_rgba.clone());
202         self
203     }
204 
cell_background_set(mut self, cell_background_set: bool) -> Self205     pub fn cell_background_set(mut self, cell_background_set: bool) -> Self {
206         self.cell_background_set = Some(cell_background_set);
207         self
208     }
209 
height(mut self, height: i32) -> Self210     pub fn height(mut self, height: i32) -> Self {
211         self.height = Some(height);
212         self
213     }
214 
is_expanded(mut self, is_expanded: bool) -> Self215     pub fn is_expanded(mut self, is_expanded: bool) -> Self {
216         self.is_expanded = Some(is_expanded);
217         self
218     }
219 
is_expander(mut self, is_expander: bool) -> Self220     pub fn is_expander(mut self, is_expander: bool) -> Self {
221         self.is_expander = Some(is_expander);
222         self
223     }
224 
mode(mut self, mode: CellRendererMode) -> Self225     pub fn mode(mut self, mode: CellRendererMode) -> Self {
226         self.mode = Some(mode);
227         self
228     }
229 
sensitive(mut self, sensitive: bool) -> Self230     pub fn sensitive(mut self, sensitive: bool) -> Self {
231         self.sensitive = Some(sensitive);
232         self
233     }
234 
visible(mut self, visible: bool) -> Self235     pub fn visible(mut self, visible: bool) -> Self {
236         self.visible = Some(visible);
237         self
238     }
239 
width(mut self, width: i32) -> Self240     pub fn width(mut self, width: i32) -> Self {
241         self.width = Some(width);
242         self
243     }
244 
xalign(mut self, xalign: f32) -> Self245     pub fn xalign(mut self, xalign: f32) -> Self {
246         self.xalign = Some(xalign);
247         self
248     }
249 
xpad(mut self, xpad: u32) -> Self250     pub fn xpad(mut self, xpad: u32) -> Self {
251         self.xpad = Some(xpad);
252         self
253     }
254 
yalign(mut self, yalign: f32) -> Self255     pub fn yalign(mut self, yalign: f32) -> Self {
256         self.yalign = Some(yalign);
257         self
258     }
259 
ypad(mut self, ypad: u32) -> Self260     pub fn ypad(mut self, ypad: u32) -> Self {
261         self.ypad = Some(ypad);
262         self
263     }
264 }
265 
266 pub const NONE_CELL_RENDERER_PIXBUF: Option<&CellRendererPixbuf> = None;
267 
268 pub trait CellRendererPixbufExt: 'static {
269     #[cfg_attr(feature = "v3_16", deprecated)]
get_property_follow_state(&self) -> bool270     fn get_property_follow_state(&self) -> bool;
271 
272     #[cfg_attr(feature = "v3_16", deprecated)]
set_property_follow_state(&self, follow_state: bool)273     fn set_property_follow_state(&self, follow_state: bool);
274 
get_property_gicon(&self) -> Option<gio::Icon>275     fn get_property_gicon(&self) -> Option<gio::Icon>;
276 
set_property_gicon<P: IsA<gio::Icon> + SetValueOptional>(&self, gicon: Option<&P>)277     fn set_property_gicon<P: IsA<gio::Icon> + SetValueOptional>(&self, gicon: Option<&P>);
278 
get_property_icon_name(&self) -> Option<GString>279     fn get_property_icon_name(&self) -> Option<GString>;
280 
set_property_icon_name(&self, icon_name: Option<&str>)281     fn set_property_icon_name(&self, icon_name: Option<&str>);
282 
get_property_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf>283     fn get_property_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf>;
284 
set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>)285     fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>);
286 
get_property_pixbuf_expander_closed(&self) -> Option<gdk_pixbuf::Pixbuf>287     fn get_property_pixbuf_expander_closed(&self) -> Option<gdk_pixbuf::Pixbuf>;
288 
set_property_pixbuf_expander_closed( &self, pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>, )289     fn set_property_pixbuf_expander_closed(
290         &self,
291         pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>,
292     );
293 
get_property_pixbuf_expander_open(&self) -> Option<gdk_pixbuf::Pixbuf>294     fn get_property_pixbuf_expander_open(&self) -> Option<gdk_pixbuf::Pixbuf>;
295 
set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>)296     fn set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>);
297 
get_property_stock_detail(&self) -> Option<GString>298     fn get_property_stock_detail(&self) -> Option<GString>;
299 
set_property_stock_detail(&self, stock_detail: Option<&str>)300     fn set_property_stock_detail(&self, stock_detail: Option<&str>);
301 
302     #[cfg_attr(feature = "v3_16", deprecated)]
connect_property_follow_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId303     fn connect_property_follow_state_notify<F: Fn(&Self) + 'static>(&self, f: F)
304         -> SignalHandlerId;
305 
connect_property_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId306     fn connect_property_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
307 
connect_property_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId308     fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
309 
connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId310     fn connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
311 
connect_property_pixbuf_expander_closed_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId312     fn connect_property_pixbuf_expander_closed_notify<F: Fn(&Self) + 'static>(
313         &self,
314         f: F,
315     ) -> SignalHandlerId;
316 
connect_property_pixbuf_expander_open_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId317     fn connect_property_pixbuf_expander_open_notify<F: Fn(&Self) + 'static>(
318         &self,
319         f: F,
320     ) -> SignalHandlerId;
321 
connect_property_stock_detail_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId322     fn connect_property_stock_detail_notify<F: Fn(&Self) + 'static>(&self, f: F)
323         -> SignalHandlerId;
324 
connect_property_stock_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId325     fn connect_property_stock_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
326 }
327 
328 impl<O: IsA<CellRendererPixbuf>> CellRendererPixbufExt for O {
get_property_follow_state(&self) -> bool329     fn get_property_follow_state(&self) -> bool {
330         unsafe {
331             let mut value = Value::from_type(<bool as StaticType>::static_type());
332             gobject_sys::g_object_get_property(
333                 self.to_glib_none().0 as *mut gobject_sys::GObject,
334                 b"follow-state\0".as_ptr() as *const _,
335                 value.to_glib_none_mut().0,
336             );
337             value
338                 .get()
339                 .expect("Return Value for property `follow-state` getter")
340                 .unwrap()
341         }
342     }
343 
set_property_follow_state(&self, follow_state: bool)344     fn set_property_follow_state(&self, follow_state: bool) {
345         unsafe {
346             gobject_sys::g_object_set_property(
347                 self.to_glib_none().0 as *mut gobject_sys::GObject,
348                 b"follow-state\0".as_ptr() as *const _,
349                 Value::from(&follow_state).to_glib_none().0,
350             );
351         }
352     }
353 
get_property_gicon(&self) -> Option<gio::Icon>354     fn get_property_gicon(&self) -> Option<gio::Icon> {
355         unsafe {
356             let mut value = Value::from_type(<gio::Icon as StaticType>::static_type());
357             gobject_sys::g_object_get_property(
358                 self.to_glib_none().0 as *mut gobject_sys::GObject,
359                 b"gicon\0".as_ptr() as *const _,
360                 value.to_glib_none_mut().0,
361             );
362             value
363                 .get()
364                 .expect("Return Value for property `gicon` getter")
365         }
366     }
367 
set_property_gicon<P: IsA<gio::Icon> + SetValueOptional>(&self, gicon: Option<&P>)368     fn set_property_gicon<P: IsA<gio::Icon> + SetValueOptional>(&self, gicon: Option<&P>) {
369         unsafe {
370             gobject_sys::g_object_set_property(
371                 self.to_glib_none().0 as *mut gobject_sys::GObject,
372                 b"gicon\0".as_ptr() as *const _,
373                 Value::from(gicon).to_glib_none().0,
374             );
375         }
376     }
377 
get_property_icon_name(&self) -> Option<GString>378     fn get_property_icon_name(&self) -> Option<GString> {
379         unsafe {
380             let mut value = Value::from_type(<GString as StaticType>::static_type());
381             gobject_sys::g_object_get_property(
382                 self.to_glib_none().0 as *mut gobject_sys::GObject,
383                 b"icon-name\0".as_ptr() as *const _,
384                 value.to_glib_none_mut().0,
385             );
386             value
387                 .get()
388                 .expect("Return Value for property `icon-name` getter")
389         }
390     }
391 
set_property_icon_name(&self, icon_name: Option<&str>)392     fn set_property_icon_name(&self, icon_name: Option<&str>) {
393         unsafe {
394             gobject_sys::g_object_set_property(
395                 self.to_glib_none().0 as *mut gobject_sys::GObject,
396                 b"icon-name\0".as_ptr() as *const _,
397                 Value::from(icon_name).to_glib_none().0,
398             );
399         }
400     }
401 
get_property_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf>402     fn get_property_pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
403         unsafe {
404             let mut value = Value::from_type(<gdk_pixbuf::Pixbuf as StaticType>::static_type());
405             gobject_sys::g_object_get_property(
406                 self.to_glib_none().0 as *mut gobject_sys::GObject,
407                 b"pixbuf\0".as_ptr() as *const _,
408                 value.to_glib_none_mut().0,
409             );
410             value
411                 .get()
412                 .expect("Return Value for property `pixbuf` getter")
413         }
414     }
415 
set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>)416     fn set_property_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
417         unsafe {
418             gobject_sys::g_object_set_property(
419                 self.to_glib_none().0 as *mut gobject_sys::GObject,
420                 b"pixbuf\0".as_ptr() as *const _,
421                 Value::from(pixbuf).to_glib_none().0,
422             );
423         }
424     }
425 
get_property_pixbuf_expander_closed(&self) -> Option<gdk_pixbuf::Pixbuf>426     fn get_property_pixbuf_expander_closed(&self) -> Option<gdk_pixbuf::Pixbuf> {
427         unsafe {
428             let mut value = Value::from_type(<gdk_pixbuf::Pixbuf as StaticType>::static_type());
429             gobject_sys::g_object_get_property(
430                 self.to_glib_none().0 as *mut gobject_sys::GObject,
431                 b"pixbuf-expander-closed\0".as_ptr() as *const _,
432                 value.to_glib_none_mut().0,
433             );
434             value
435                 .get()
436                 .expect("Return Value for property `pixbuf-expander-closed` getter")
437         }
438     }
439 
set_property_pixbuf_expander_closed( &self, pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>, )440     fn set_property_pixbuf_expander_closed(
441         &self,
442         pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>,
443     ) {
444         unsafe {
445             gobject_sys::g_object_set_property(
446                 self.to_glib_none().0 as *mut gobject_sys::GObject,
447                 b"pixbuf-expander-closed\0".as_ptr() as *const _,
448                 Value::from(pixbuf_expander_closed).to_glib_none().0,
449             );
450         }
451     }
452 
get_property_pixbuf_expander_open(&self) -> Option<gdk_pixbuf::Pixbuf>453     fn get_property_pixbuf_expander_open(&self) -> Option<gdk_pixbuf::Pixbuf> {
454         unsafe {
455             let mut value = Value::from_type(<gdk_pixbuf::Pixbuf as StaticType>::static_type());
456             gobject_sys::g_object_get_property(
457                 self.to_glib_none().0 as *mut gobject_sys::GObject,
458                 b"pixbuf-expander-open\0".as_ptr() as *const _,
459                 value.to_glib_none_mut().0,
460             );
461             value
462                 .get()
463                 .expect("Return Value for property `pixbuf-expander-open` getter")
464         }
465     }
466 
set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>)467     fn set_property_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>) {
468         unsafe {
469             gobject_sys::g_object_set_property(
470                 self.to_glib_none().0 as *mut gobject_sys::GObject,
471                 b"pixbuf-expander-open\0".as_ptr() as *const _,
472                 Value::from(pixbuf_expander_open).to_glib_none().0,
473             );
474         }
475     }
476 
get_property_stock_detail(&self) -> Option<GString>477     fn get_property_stock_detail(&self) -> Option<GString> {
478         unsafe {
479             let mut value = Value::from_type(<GString as StaticType>::static_type());
480             gobject_sys::g_object_get_property(
481                 self.to_glib_none().0 as *mut gobject_sys::GObject,
482                 b"stock-detail\0".as_ptr() as *const _,
483                 value.to_glib_none_mut().0,
484             );
485             value
486                 .get()
487                 .expect("Return Value for property `stock-detail` getter")
488         }
489     }
490 
set_property_stock_detail(&self, stock_detail: Option<&str>)491     fn set_property_stock_detail(&self, stock_detail: Option<&str>) {
492         unsafe {
493             gobject_sys::g_object_set_property(
494                 self.to_glib_none().0 as *mut gobject_sys::GObject,
495                 b"stock-detail\0".as_ptr() as *const _,
496                 Value::from(stock_detail).to_glib_none().0,
497             );
498         }
499     }
500 
connect_property_follow_state_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId501     fn connect_property_follow_state_notify<F: Fn(&Self) + 'static>(
502         &self,
503         f: F,
504     ) -> SignalHandlerId {
505         unsafe extern "C" fn notify_follow_state_trampoline<P, F: Fn(&P) + 'static>(
506             this: *mut gtk_sys::GtkCellRendererPixbuf,
507             _param_spec: glib_sys::gpointer,
508             f: glib_sys::gpointer,
509         ) where
510             P: IsA<CellRendererPixbuf>,
511         {
512             let f: &F = &*(f as *const F);
513             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
514         }
515         unsafe {
516             let f: Box_<F> = Box_::new(f);
517             connect_raw(
518                 self.as_ptr() as *mut _,
519                 b"notify::follow-state\0".as_ptr() as *const _,
520                 Some(transmute(
521                     notify_follow_state_trampoline::<Self, F> as usize,
522                 )),
523                 Box_::into_raw(f),
524             )
525         }
526     }
527 
connect_property_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId528     fn connect_property_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
529         unsafe extern "C" fn notify_gicon_trampoline<P, F: Fn(&P) + 'static>(
530             this: *mut gtk_sys::GtkCellRendererPixbuf,
531             _param_spec: glib_sys::gpointer,
532             f: glib_sys::gpointer,
533         ) where
534             P: IsA<CellRendererPixbuf>,
535         {
536             let f: &F = &*(f as *const F);
537             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
538         }
539         unsafe {
540             let f: Box_<F> = Box_::new(f);
541             connect_raw(
542                 self.as_ptr() as *mut _,
543                 b"notify::gicon\0".as_ptr() as *const _,
544                 Some(transmute(notify_gicon_trampoline::<Self, F> as usize)),
545                 Box_::into_raw(f),
546             )
547         }
548     }
549 
connect_property_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId550     fn connect_property_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
551         unsafe extern "C" fn notify_icon_name_trampoline<P, F: Fn(&P) + 'static>(
552             this: *mut gtk_sys::GtkCellRendererPixbuf,
553             _param_spec: glib_sys::gpointer,
554             f: glib_sys::gpointer,
555         ) where
556             P: IsA<CellRendererPixbuf>,
557         {
558             let f: &F = &*(f as *const F);
559             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
560         }
561         unsafe {
562             let f: Box_<F> = Box_::new(f);
563             connect_raw(
564                 self.as_ptr() as *mut _,
565                 b"notify::icon-name\0".as_ptr() as *const _,
566                 Some(transmute(notify_icon_name_trampoline::<Self, F> as usize)),
567                 Box_::into_raw(f),
568             )
569         }
570     }
571 
connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId572     fn connect_property_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
573         unsafe extern "C" fn notify_pixbuf_trampoline<P, F: Fn(&P) + 'static>(
574             this: *mut gtk_sys::GtkCellRendererPixbuf,
575             _param_spec: glib_sys::gpointer,
576             f: glib_sys::gpointer,
577         ) where
578             P: IsA<CellRendererPixbuf>,
579         {
580             let f: &F = &*(f as *const F);
581             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
582         }
583         unsafe {
584             let f: Box_<F> = Box_::new(f);
585             connect_raw(
586                 self.as_ptr() as *mut _,
587                 b"notify::pixbuf\0".as_ptr() as *const _,
588                 Some(transmute(notify_pixbuf_trampoline::<Self, F> as usize)),
589                 Box_::into_raw(f),
590             )
591         }
592     }
593 
connect_property_pixbuf_expander_closed_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId594     fn connect_property_pixbuf_expander_closed_notify<F: Fn(&Self) + 'static>(
595         &self,
596         f: F,
597     ) -> SignalHandlerId {
598         unsafe extern "C" fn notify_pixbuf_expander_closed_trampoline<P, F: Fn(&P) + 'static>(
599             this: *mut gtk_sys::GtkCellRendererPixbuf,
600             _param_spec: glib_sys::gpointer,
601             f: glib_sys::gpointer,
602         ) where
603             P: IsA<CellRendererPixbuf>,
604         {
605             let f: &F = &*(f as *const F);
606             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
607         }
608         unsafe {
609             let f: Box_<F> = Box_::new(f);
610             connect_raw(
611                 self.as_ptr() as *mut _,
612                 b"notify::pixbuf-expander-closed\0".as_ptr() as *const _,
613                 Some(transmute(
614                     notify_pixbuf_expander_closed_trampoline::<Self, F> as usize,
615                 )),
616                 Box_::into_raw(f),
617             )
618         }
619     }
620 
connect_property_pixbuf_expander_open_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId621     fn connect_property_pixbuf_expander_open_notify<F: Fn(&Self) + 'static>(
622         &self,
623         f: F,
624     ) -> SignalHandlerId {
625         unsafe extern "C" fn notify_pixbuf_expander_open_trampoline<P, F: Fn(&P) + 'static>(
626             this: *mut gtk_sys::GtkCellRendererPixbuf,
627             _param_spec: glib_sys::gpointer,
628             f: glib_sys::gpointer,
629         ) where
630             P: IsA<CellRendererPixbuf>,
631         {
632             let f: &F = &*(f as *const F);
633             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
634         }
635         unsafe {
636             let f: Box_<F> = Box_::new(f);
637             connect_raw(
638                 self.as_ptr() as *mut _,
639                 b"notify::pixbuf-expander-open\0".as_ptr() as *const _,
640                 Some(transmute(
641                     notify_pixbuf_expander_open_trampoline::<Self, F> as usize,
642                 )),
643                 Box_::into_raw(f),
644             )
645         }
646     }
647 
connect_property_stock_detail_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId648     fn connect_property_stock_detail_notify<F: Fn(&Self) + 'static>(
649         &self,
650         f: F,
651     ) -> SignalHandlerId {
652         unsafe extern "C" fn notify_stock_detail_trampoline<P, F: Fn(&P) + 'static>(
653             this: *mut gtk_sys::GtkCellRendererPixbuf,
654             _param_spec: glib_sys::gpointer,
655             f: glib_sys::gpointer,
656         ) where
657             P: IsA<CellRendererPixbuf>,
658         {
659             let f: &F = &*(f as *const F);
660             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
661         }
662         unsafe {
663             let f: Box_<F> = Box_::new(f);
664             connect_raw(
665                 self.as_ptr() as *mut _,
666                 b"notify::stock-detail\0".as_ptr() as *const _,
667                 Some(transmute(
668                     notify_stock_detail_trampoline::<Self, F> as usize,
669                 )),
670                 Box_::into_raw(f),
671             )
672         }
673     }
674 
connect_property_stock_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId675     fn connect_property_stock_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
676         unsafe extern "C" fn notify_stock_size_trampoline<P, F: Fn(&P) + 'static>(
677             this: *mut gtk_sys::GtkCellRendererPixbuf,
678             _param_spec: glib_sys::gpointer,
679             f: glib_sys::gpointer,
680         ) where
681             P: IsA<CellRendererPixbuf>,
682         {
683             let f: &F = &*(f as *const F);
684             f(&CellRendererPixbuf::from_glib_borrow(this).unsafe_cast())
685         }
686         unsafe {
687             let f: Box_<F> = Box_::new(f);
688             connect_raw(
689                 self.as_ptr() as *mut _,
690                 b"notify::stock-size\0".as_ptr() as *const _,
691                 Some(transmute(notify_stock_size_trampoline::<Self, F> as usize)),
692                 Box_::into_raw(f),
693             )
694         }
695     }
696 }
697 
698 impl fmt::Display for CellRendererPixbuf {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result699     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
700         write!(f, "CellRendererPixbuf")
701     }
702 }
703