Gtk.Widget.prototype.set_can_focus

function set_can_focus(can_focus:Boolean):void {
    // Gjs wrapper for gtk_widget_set_can_focus()
}

Specifies whether widget can own the input focus. See Gtk.Widget.prototype.grab_focus for actually setting the input focus on a widget.

Since 2.18

can_focus

whether or not widget can own the input focus.