gio/auto/
bytes_icon.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::{ffi, Icon, LoadableIcon};
6use glib::translate::*;
7
8glib::wrapper! {
9    #[doc(alias = "GBytesIcon")]
10    pub struct BytesIcon(Object<ffi::GBytesIcon>) @implements Icon, LoadableIcon;
11
12    match fn {
13        type_ => || ffi::g_bytes_icon_get_type(),
14    }
15}
16
17impl BytesIcon {
18    #[doc(alias = "g_bytes_icon_new")]
19    pub fn new(bytes: &glib::Bytes) -> BytesIcon {
20        unsafe { from_glib_full(ffi::g_bytes_icon_new(bytes.to_glib_none().0)) }
21    }
22
23    #[doc(alias = "g_bytes_icon_get_bytes")]
24    #[doc(alias = "get_bytes")]
25    pub fn bytes(&self) -> glib::Bytes {
26        unsafe { from_glib_none(ffi::g_bytes_icon_get_bytes(self.to_glib_none().0)) }
27    }
28}