Gtk.StatusIcon.new_from_gicon

function new_from_gicon(icon:Gio.Icon):Gtk.StatusIcon {
    // Gjs wrapper for gtk_status_icon_new_from_gicon()
}

Creates a status icon displaying a Gio.Icon. If the icon is a themed icon, it will be updated when the theme changes.

Since 2.14

icon

a Gio.Icon

Returns

a new Gtk.StatusIcon