Class: Gio::BytesIcon

Inherits:
Object
  • Object
show all
Defined in:
lib/gio2/bytes-icon.rb

Overview

GBytesIcon specifies an image held in memory in a common format (usually PNG) to be used as icon.

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ 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 g_loadable_icon_load() is called) if the image is invalid.

Parameters:

  • bytes (GLib::Bytes)

    a #GBytes.



20
21
22
23
# File 'lib/gio2/bytes-icon.rb', line 20

def initialize(bytes)
  @bytes = bytes
  initialize_raw(@bytes)
end

Instance Method Details

#bytesGLib::Bytes

The bytes containing the icon.

Returns:

  • (GLib::Bytes)

    bytes

#bytes=(bytes) ⇒ GLib::Bytes

The bytes containing the icon.

Parameters:

  • bytes (GLib::Bytes)

Returns:

  • (GLib::Bytes)

    bytes

  • (GLib::Bytes)

    bytes

#initialize_rawGio::BytesIcon

Creates a new icon for a bytes.

This cannot fail, but loading and interpreting the bytes may fail later on (for example, if g_loadable_icon_load() is called) if the image is invalid.

Parameters:

  • bytes (GLib::Bytes)

    a #GBytes.

Returns:



# File 'lib/gio2/bytes-icon.rb', line 19