:right-sidebar: True BytesIcon =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.38 .. class:: BytesIcon(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.Icon`, :class:`~gi.repository.Gio.LoadableIcon` ``GBytesIcon`` specifies an image held in memory in a common format (usually PNG) to be used as icon. Constructors ------------ .. rst-class:: interim-class .. class:: BytesIcon :no-index: .. classmethod:: new(bytes: ~gi.repository.GLib.Bytes) -> ~gi.repository.Gio.BytesIcon Creates a new icon for a bytes. This cannot fail, but loading and interpreting the bytes may fail later on (for example, if :func:`~gi.repository.Gio.LoadableIcon.load` is called) if the image is invalid. .. versionadded:: 2.38 :param bytes: a :obj:`~gi.repository.GLib.Bytes`\. Methods ------- .. rst-class:: interim-class .. class:: BytesIcon :no-index: .. method:: get_bytes() -> ~gi.repository.GLib.Bytes Gets the :obj:`~gi.repository.GLib.Bytes` associated with the given ``icon``\. .. versionadded:: 2.38 Properties ---------- .. rst-class:: interim-class .. class:: BytesIcon :no-index: .. attribute:: props.bytes :type: ~gi.repository.GLib.Bytes The type of the None singleton.