1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use gtk::{gdk_pixbuf::Pixbuf, Picture}; pub struct Image { gobject: Picture, } impl Image { // Construct pub fn new_from_pixbuf(buffer: &Pixbuf) -> Self { Self { gobject: Picture::for_pixbuf(buffer), } } // Getters pub fn gobject(&self) -> &Picture { &self.gobject } }