Skip to main content

gtk/auto/
cell_renderer_pixbuf.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::{CellRenderer, CellRendererMode};
6use glib::{
7    prelude::*,
8    signal::{connect_raw, SignalHandlerId},
9    translate::*,
10};
11use std::{boxed::Box as Box_, fmt, mem::transmute};
12
13glib::wrapper! {
14    /// A [`CellRendererPixbuf`][crate::CellRendererPixbuf] can be used to render an image in a cell. It allows
15    /// to render either a given [`gdk_pixbuf::Pixbuf`][crate::gdk_pixbuf::Pixbuf] (set via the
16    /// [`pixbuf`][struct@crate::CellRendererPixbuf#pixbuf] property) or a named icon (set via the
17    /// [`icon-name`][struct@crate::CellRendererPixbuf#icon-name] property).
18    ///
19    /// To support the tree view, [`CellRendererPixbuf`][crate::CellRendererPixbuf] also supports rendering two
20    /// alternative pixbufs, when the [`is-expander`][struct@crate::CellRenderer#is-expander] property is [`true`].
21    /// If the [`is-expanded`][struct@crate::CellRenderer#is-expanded] property is [`true`] and the
22    /// [`pixbuf-expander-open`][struct@crate::CellRendererPixbuf#pixbuf-expander-open] property is set to a pixbuf, it
23    /// renders that pixbuf, if the [`is-expanded`][struct@crate::CellRenderer#is-expanded] property is [`false`]
24    /// and the [`pixbuf-expander-closed`][struct@crate::CellRendererPixbuf#pixbuf-expander-closed] property is set to a
25    /// pixbuf, it renders that one.
26    ///
27    /// ## Properties
28    ///
29    ///
30    /// #### `follow-state`
31    ///  Specifies whether the rendered pixbuf should be colorized
32    /// according to the [`CellRendererState`][crate::CellRendererState].
33    ///
34    /// Readable | Writeable
35    ///
36    ///
37    /// #### `gicon`
38    ///  The GIcon representing the icon to display.
39    /// If the icon theme is changed, the image will be updated
40    /// automatically.
41    ///
42    /// Readable | Writeable
43    ///
44    ///
45    /// #### `icon-name`
46    ///  The name of the themed icon to display.
47    /// This property only has an effect if not overridden by "stock_id"
48    /// or "pixbuf" properties.
49    ///
50    /// Readable | Writeable
51    ///
52    ///
53    /// #### `pixbuf`
54    ///  Readable | Writeable
55    ///
56    ///
57    /// #### `pixbuf-expander-closed`
58    ///  Readable | Writeable
59    ///
60    ///
61    /// #### `pixbuf-expander-open`
62    ///  Readable | Writeable
63    ///
64    ///
65    /// #### `stock-detail`
66    ///  Readable | Writeable
67    ///
68    ///
69    /// #### `stock-id`
70    ///  Readable | Writeable
71    ///
72    ///
73    /// #### `stock-size`
74    ///  The [`IconSize`][crate::IconSize] value that specifies the size of the rendered icon.
75    ///
76    /// Readable | Writeable
77    ///
78    ///
79    /// #### `surface`
80    ///  Readable | Writeable
81    /// <details><summary><h4>CellRenderer</h4></summary>
82    ///
83    ///
84    /// #### `cell-background`
85    ///  Writeable
86    ///
87    ///
88    /// #### `cell-background-gdk`
89    ///  Cell background as a `GdkColor`
90    ///
91    /// Readable | Writeable
92    ///
93    ///
94    /// #### `cell-background-rgba`
95    ///  Cell background as a [`gdk::RGBA`][crate::gdk::RGBA]
96    ///
97    /// Readable | Writeable
98    ///
99    ///
100    /// #### `cell-background-set`
101    ///  Readable | Writeable
102    ///
103    ///
104    /// #### `editing`
105    ///  Readable
106    ///
107    ///
108    /// #### `height`
109    ///  Readable | Writeable
110    ///
111    ///
112    /// #### `is-expanded`
113    ///  Readable | Writeable
114    ///
115    ///
116    /// #### `is-expander`
117    ///  Readable | Writeable
118    ///
119    ///
120    /// #### `mode`
121    ///  Readable | Writeable
122    ///
123    ///
124    /// #### `sensitive`
125    ///  Readable | Writeable
126    ///
127    ///
128    /// #### `visible`
129    ///  Readable | Writeable
130    ///
131    ///
132    /// #### `width`
133    ///  Readable | Writeable
134    ///
135    ///
136    /// #### `xalign`
137    ///  Readable | Writeable
138    ///
139    ///
140    /// #### `xpad`
141    ///  Readable | Writeable
142    ///
143    ///
144    /// #### `yalign`
145    ///  Readable | Writeable
146    ///
147    ///
148    /// #### `ypad`
149    ///  Readable | Writeable
150    /// </details>
151    ///
152    /// # Implements
153    ///
154    /// [`CellRendererPixbufExt`][trait@crate::prelude::CellRendererPixbufExt], [`CellRendererExt`][trait@crate::prelude::CellRendererExt], [`trait@glib::ObjectExt`], [`CellRendererPixbufExtManual`][trait@crate::prelude::CellRendererPixbufExtManual]
155    #[doc(alias = "GtkCellRendererPixbuf")]
156    pub struct CellRendererPixbuf(Object<ffi::GtkCellRendererPixbuf, ffi::GtkCellRendererPixbufClass>) @extends CellRenderer;
157
158    match fn {
159        type_ => || ffi::gtk_cell_renderer_pixbuf_get_type(),
160    }
161}
162
163impl CellRendererPixbuf {
164    pub const NONE: Option<&'static CellRendererPixbuf> = None;
165
166    /// Creates a new [`CellRendererPixbuf`][crate::CellRendererPixbuf]. Adjust rendering
167    /// parameters using object properties. Object properties can be set
168    /// globally (with [`ObjectExt::set()`][crate::glib::prelude::ObjectExt::set()]). Also, with [`TreeViewColumn`][crate::TreeViewColumn], you
169    /// can bind a property to a value in a [`TreeModel`][crate::TreeModel]. For example, you
170    /// can bind the “pixbuf” property on the cell renderer to a pixbuf value
171    /// in the model, thus rendering a different image in each row of the
172    /// [`TreeView`][crate::TreeView].
173    ///
174    /// # Returns
175    ///
176    /// the new cell renderer
177    #[doc(alias = "gtk_cell_renderer_pixbuf_new")]
178    pub fn new() -> CellRendererPixbuf {
179        assert_initialized_main_thread!();
180        unsafe { CellRenderer::from_glib_none(ffi::gtk_cell_renderer_pixbuf_new()).unsafe_cast() }
181    }
182
183    // rustdoc-stripper-ignore-next
184    /// Creates a new builder-pattern struct instance to construct [`CellRendererPixbuf`] objects.
185    ///
186    /// This method returns an instance of [`CellRendererPixbufBuilder`](crate::builders::CellRendererPixbufBuilder) which can be used to create [`CellRendererPixbuf`] objects.
187    pub fn builder() -> CellRendererPixbufBuilder {
188        CellRendererPixbufBuilder::new()
189    }
190}
191
192impl Default for CellRendererPixbuf {
193    fn default() -> Self {
194        Self::new()
195    }
196}
197
198// rustdoc-stripper-ignore-next
199/// A [builder-pattern] type to construct [`CellRendererPixbuf`] objects.
200///
201/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
202#[must_use = "The builder must be built to be used"]
203pub struct CellRendererPixbufBuilder {
204    builder: glib::object::ObjectBuilder<'static, CellRendererPixbuf>,
205}
206
207impl CellRendererPixbufBuilder {
208    fn new() -> Self {
209        Self {
210            builder: glib::object::Object::builder(),
211        }
212    }
213
214    /// The GIcon representing the icon to display.
215    /// If the icon theme is changed, the image will be updated
216    /// automatically.
217    pub fn gicon(self, gicon: &impl IsA<gio::Icon>) -> Self {
218        Self {
219            builder: self.builder.property("gicon", gicon.clone().upcast()),
220        }
221    }
222
223    /// The name of the themed icon to display.
224    /// This property only has an effect if not overridden by "stock_id"
225    /// or "pixbuf" properties.
226    pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
227        Self {
228            builder: self.builder.property("icon-name", icon_name.into()),
229        }
230    }
231
232    pub fn pixbuf(self, pixbuf: &gdk_pixbuf::Pixbuf) -> Self {
233        Self {
234            builder: self.builder.property("pixbuf", pixbuf.clone()),
235        }
236    }
237
238    pub fn pixbuf_expander_closed(self, pixbuf_expander_closed: &gdk_pixbuf::Pixbuf) -> Self {
239        Self {
240            builder: self
241                .builder
242                .property("pixbuf-expander-closed", pixbuf_expander_closed.clone()),
243        }
244    }
245
246    pub fn pixbuf_expander_open(self, pixbuf_expander_open: &gdk_pixbuf::Pixbuf) -> Self {
247        Self {
248            builder: self
249                .builder
250                .property("pixbuf-expander-open", pixbuf_expander_open.clone()),
251        }
252    }
253
254    pub fn stock_detail(self, stock_detail: impl Into<glib::GString>) -> Self {
255        Self {
256            builder: self.builder.property("stock-detail", stock_detail.into()),
257        }
258    }
259
260    /// The [`IconSize`][crate::IconSize] value that specifies the size of the rendered icon.
261    pub fn stock_size(self, stock_size: u32) -> Self {
262        Self {
263            builder: self.builder.property("stock-size", stock_size),
264        }
265    }
266
267    pub fn surface(self, surface: &cairo::Surface) -> Self {
268        Self {
269            builder: self.builder.property("surface", surface),
270        }
271    }
272
273    pub fn cell_background(self, cell_background: impl Into<glib::GString>) -> Self {
274        Self {
275            builder: self
276                .builder
277                .property("cell-background", cell_background.into()),
278        }
279    }
280
281    /// Cell background as a [`gdk::RGBA`][crate::gdk::RGBA]
282    pub fn cell_background_rgba(self, cell_background_rgba: &gdk::RGBA) -> Self {
283        Self {
284            builder: self
285                .builder
286                .property("cell-background-rgba", cell_background_rgba),
287        }
288    }
289
290    pub fn cell_background_set(self, cell_background_set: bool) -> Self {
291        Self {
292            builder: self
293                .builder
294                .property("cell-background-set", cell_background_set),
295        }
296    }
297
298    pub fn height(self, height: i32) -> Self {
299        Self {
300            builder: self.builder.property("height", height),
301        }
302    }
303
304    pub fn is_expanded(self, is_expanded: bool) -> Self {
305        Self {
306            builder: self.builder.property("is-expanded", is_expanded),
307        }
308    }
309
310    pub fn is_expander(self, is_expander: bool) -> Self {
311        Self {
312            builder: self.builder.property("is-expander", is_expander),
313        }
314    }
315
316    pub fn mode(self, mode: CellRendererMode) -> Self {
317        Self {
318            builder: self.builder.property("mode", mode),
319        }
320    }
321
322    pub fn sensitive(self, sensitive: bool) -> Self {
323        Self {
324            builder: self.builder.property("sensitive", sensitive),
325        }
326    }
327
328    pub fn visible(self, visible: bool) -> Self {
329        Self {
330            builder: self.builder.property("visible", visible),
331        }
332    }
333
334    pub fn width(self, width: i32) -> Self {
335        Self {
336            builder: self.builder.property("width", width),
337        }
338    }
339
340    pub fn xalign(self, xalign: f32) -> Self {
341        Self {
342            builder: self.builder.property("xalign", xalign),
343        }
344    }
345
346    pub fn xpad(self, xpad: u32) -> Self {
347        Self {
348            builder: self.builder.property("xpad", xpad),
349        }
350    }
351
352    pub fn yalign(self, yalign: f32) -> Self {
353        Self {
354            builder: self.builder.property("yalign", yalign),
355        }
356    }
357
358    pub fn ypad(self, ypad: u32) -> Self {
359        Self {
360            builder: self.builder.property("ypad", ypad),
361        }
362    }
363
364    // rustdoc-stripper-ignore-next
365    /// Build the [`CellRendererPixbuf`].
366    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
367    pub fn build(self) -> CellRendererPixbuf {
368        self.builder.build()
369    }
370}
371
372mod sealed {
373    pub trait Sealed {}
374    impl<T: super::IsA<super::CellRendererPixbuf>> Sealed for T {}
375}
376
377/// Trait containing all [`struct@CellRendererPixbuf`] methods.
378///
379/// # Implementors
380///
381/// [`CellRendererPixbuf`][struct@crate::CellRendererPixbuf]
382pub trait CellRendererPixbufExt: IsA<CellRendererPixbuf> + sealed::Sealed + 'static {
383    /// The GIcon representing the icon to display.
384    /// If the icon theme is changed, the image will be updated
385    /// automatically.
386    fn gicon(&self) -> Option<gio::Icon> {
387        ObjectExt::property(self.as_ref(), "gicon")
388    }
389
390    /// The GIcon representing the icon to display.
391    /// If the icon theme is changed, the image will be updated
392    /// automatically.
393    fn set_gicon<P: IsA<gio::Icon>>(&self, gicon: Option<&P>) {
394        ObjectExt::set_property(self.as_ref(), "gicon", gicon)
395    }
396
397    /// The name of the themed icon to display.
398    /// This property only has an effect if not overridden by "stock_id"
399    /// or "pixbuf" properties.
400    #[doc(alias = "icon-name")]
401    fn icon_name(&self) -> Option<glib::GString> {
402        ObjectExt::property(self.as_ref(), "icon-name")
403    }
404
405    /// The name of the themed icon to display.
406    /// This property only has an effect if not overridden by "stock_id"
407    /// or "pixbuf" properties.
408    #[doc(alias = "icon-name")]
409    fn set_icon_name(&self, icon_name: Option<&str>) {
410        ObjectExt::set_property(self.as_ref(), "icon-name", icon_name)
411    }
412
413    fn pixbuf(&self) -> Option<gdk_pixbuf::Pixbuf> {
414        ObjectExt::property(self.as_ref(), "pixbuf")
415    }
416
417    fn set_pixbuf(&self, pixbuf: Option<&gdk_pixbuf::Pixbuf>) {
418        ObjectExt::set_property(self.as_ref(), "pixbuf", pixbuf)
419    }
420
421    #[doc(alias = "pixbuf-expander-closed")]
422    fn pixbuf_expander_closed(&self) -> Option<gdk_pixbuf::Pixbuf> {
423        ObjectExt::property(self.as_ref(), "pixbuf-expander-closed")
424    }
425
426    #[doc(alias = "pixbuf-expander-closed")]
427    fn set_pixbuf_expander_closed(&self, pixbuf_expander_closed: Option<&gdk_pixbuf::Pixbuf>) {
428        ObjectExt::set_property(
429            self.as_ref(),
430            "pixbuf-expander-closed",
431            pixbuf_expander_closed,
432        )
433    }
434
435    #[doc(alias = "pixbuf-expander-open")]
436    fn pixbuf_expander_open(&self) -> Option<gdk_pixbuf::Pixbuf> {
437        ObjectExt::property(self.as_ref(), "pixbuf-expander-open")
438    }
439
440    #[doc(alias = "pixbuf-expander-open")]
441    fn set_pixbuf_expander_open(&self, pixbuf_expander_open: Option<&gdk_pixbuf::Pixbuf>) {
442        ObjectExt::set_property(self.as_ref(), "pixbuf-expander-open", pixbuf_expander_open)
443    }
444
445    #[doc(alias = "stock-detail")]
446    fn stock_detail(&self) -> Option<glib::GString> {
447        ObjectExt::property(self.as_ref(), "stock-detail")
448    }
449
450    #[doc(alias = "stock-detail")]
451    fn set_stock_detail(&self, stock_detail: Option<&str>) {
452        ObjectExt::set_property(self.as_ref(), "stock-detail", stock_detail)
453    }
454
455    fn surface(&self) -> Option<cairo::Surface> {
456        ObjectExt::property(self.as_ref(), "surface")
457    }
458
459    fn set_surface(&self, surface: Option<&cairo::Surface>) {
460        ObjectExt::set_property(self.as_ref(), "surface", surface)
461    }
462
463    #[doc(alias = "gicon")]
464    fn connect_gicon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
465        unsafe extern "C" fn notify_gicon_trampoline<
466            P: IsA<CellRendererPixbuf>,
467            F: Fn(&P) + 'static,
468        >(
469            this: *mut ffi::GtkCellRendererPixbuf,
470            _param_spec: glib::ffi::gpointer,
471            f: glib::ffi::gpointer,
472        ) {
473            let f: &F = &*(f as *const F);
474            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
475        }
476        unsafe {
477            let f: Box_<F> = Box_::new(f);
478            connect_raw(
479                self.as_ptr() as *mut _,
480                b"notify::gicon\0".as_ptr() as *const _,
481                Some(transmute::<_, unsafe extern "C" fn()>(
482                    notify_gicon_trampoline::<Self, F> as *const (),
483                )),
484                Box_::into_raw(f),
485            )
486        }
487    }
488
489    #[doc(alias = "icon-name")]
490    fn connect_icon_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
491        unsafe extern "C" fn notify_icon_name_trampoline<
492            P: IsA<CellRendererPixbuf>,
493            F: Fn(&P) + 'static,
494        >(
495            this: *mut ffi::GtkCellRendererPixbuf,
496            _param_spec: glib::ffi::gpointer,
497            f: glib::ffi::gpointer,
498        ) {
499            let f: &F = &*(f as *const F);
500            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
501        }
502        unsafe {
503            let f: Box_<F> = Box_::new(f);
504            connect_raw(
505                self.as_ptr() as *mut _,
506                b"notify::icon-name\0".as_ptr() as *const _,
507                Some(transmute::<_, unsafe extern "C" fn()>(
508                    notify_icon_name_trampoline::<Self, F> as *const (),
509                )),
510                Box_::into_raw(f),
511            )
512        }
513    }
514
515    #[doc(alias = "pixbuf")]
516    fn connect_pixbuf_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
517        unsafe extern "C" fn notify_pixbuf_trampoline<
518            P: IsA<CellRendererPixbuf>,
519            F: Fn(&P) + 'static,
520        >(
521            this: *mut ffi::GtkCellRendererPixbuf,
522            _param_spec: glib::ffi::gpointer,
523            f: glib::ffi::gpointer,
524        ) {
525            let f: &F = &*(f as *const F);
526            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
527        }
528        unsafe {
529            let f: Box_<F> = Box_::new(f);
530            connect_raw(
531                self.as_ptr() as *mut _,
532                b"notify::pixbuf\0".as_ptr() as *const _,
533                Some(transmute::<_, unsafe extern "C" fn()>(
534                    notify_pixbuf_trampoline::<Self, F> as *const (),
535                )),
536                Box_::into_raw(f),
537            )
538        }
539    }
540
541    #[doc(alias = "pixbuf-expander-closed")]
542    fn connect_pixbuf_expander_closed_notify<F: Fn(&Self) + 'static>(
543        &self,
544        f: F,
545    ) -> SignalHandlerId {
546        unsafe extern "C" fn notify_pixbuf_expander_closed_trampoline<
547            P: IsA<CellRendererPixbuf>,
548            F: Fn(&P) + 'static,
549        >(
550            this: *mut ffi::GtkCellRendererPixbuf,
551            _param_spec: glib::ffi::gpointer,
552            f: glib::ffi::gpointer,
553        ) {
554            let f: &F = &*(f as *const F);
555            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
556        }
557        unsafe {
558            let f: Box_<F> = Box_::new(f);
559            connect_raw(
560                self.as_ptr() as *mut _,
561                b"notify::pixbuf-expander-closed\0".as_ptr() as *const _,
562                Some(transmute::<_, unsafe extern "C" fn()>(
563                    notify_pixbuf_expander_closed_trampoline::<Self, F> as *const (),
564                )),
565                Box_::into_raw(f),
566            )
567        }
568    }
569
570    #[doc(alias = "pixbuf-expander-open")]
571    fn connect_pixbuf_expander_open_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
572        unsafe extern "C" fn notify_pixbuf_expander_open_trampoline<
573            P: IsA<CellRendererPixbuf>,
574            F: Fn(&P) + 'static,
575        >(
576            this: *mut ffi::GtkCellRendererPixbuf,
577            _param_spec: glib::ffi::gpointer,
578            f: glib::ffi::gpointer,
579        ) {
580            let f: &F = &*(f as *const F);
581            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
582        }
583        unsafe {
584            let f: Box_<F> = Box_::new(f);
585            connect_raw(
586                self.as_ptr() as *mut _,
587                b"notify::pixbuf-expander-open\0".as_ptr() as *const _,
588                Some(transmute::<_, unsafe extern "C" fn()>(
589                    notify_pixbuf_expander_open_trampoline::<Self, F> as *const (),
590                )),
591                Box_::into_raw(f),
592            )
593        }
594    }
595
596    #[doc(alias = "stock-detail")]
597    fn connect_stock_detail_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
598        unsafe extern "C" fn notify_stock_detail_trampoline<
599            P: IsA<CellRendererPixbuf>,
600            F: Fn(&P) + 'static,
601        >(
602            this: *mut ffi::GtkCellRendererPixbuf,
603            _param_spec: glib::ffi::gpointer,
604            f: glib::ffi::gpointer,
605        ) {
606            let f: &F = &*(f as *const F);
607            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
608        }
609        unsafe {
610            let f: Box_<F> = Box_::new(f);
611            connect_raw(
612                self.as_ptr() as *mut _,
613                b"notify::stock-detail\0".as_ptr() as *const _,
614                Some(transmute::<_, unsafe extern "C" fn()>(
615                    notify_stock_detail_trampoline::<Self, F> as *const (),
616                )),
617                Box_::into_raw(f),
618            )
619        }
620    }
621
622    #[doc(alias = "stock-size")]
623    fn connect_stock_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
624        unsafe extern "C" fn notify_stock_size_trampoline<
625            P: IsA<CellRendererPixbuf>,
626            F: Fn(&P) + 'static,
627        >(
628            this: *mut ffi::GtkCellRendererPixbuf,
629            _param_spec: glib::ffi::gpointer,
630            f: glib::ffi::gpointer,
631        ) {
632            let f: &F = &*(f as *const F);
633            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
634        }
635        unsafe {
636            let f: Box_<F> = Box_::new(f);
637            connect_raw(
638                self.as_ptr() as *mut _,
639                b"notify::stock-size\0".as_ptr() as *const _,
640                Some(transmute::<_, unsafe extern "C" fn()>(
641                    notify_stock_size_trampoline::<Self, F> as *const (),
642                )),
643                Box_::into_raw(f),
644            )
645        }
646    }
647
648    #[doc(alias = "surface")]
649    fn connect_surface_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
650        unsafe extern "C" fn notify_surface_trampoline<
651            P: IsA<CellRendererPixbuf>,
652            F: Fn(&P) + 'static,
653        >(
654            this: *mut ffi::GtkCellRendererPixbuf,
655            _param_spec: glib::ffi::gpointer,
656            f: glib::ffi::gpointer,
657        ) {
658            let f: &F = &*(f as *const F);
659            f(CellRendererPixbuf::from_glib_borrow(this).unsafe_cast_ref())
660        }
661        unsafe {
662            let f: Box_<F> = Box_::new(f);
663            connect_raw(
664                self.as_ptr() as *mut _,
665                b"notify::surface\0".as_ptr() as *const _,
666                Some(transmute::<_, unsafe extern "C" fn()>(
667                    notify_surface_trampoline::<Self, F> as *const (),
668                )),
669                Box_::into_raw(f),
670            )
671        }
672    }
673}
674
675impl<O: IsA<CellRendererPixbuf>> CellRendererPixbufExt for O {}
676
677impl fmt::Display for CellRendererPixbuf {
678    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
679        f.write_str("CellRendererPixbuf")
680    }
681}