Gtk.Window.prototype.get_role

function get_role():String {
    // Gjs wrapper for gtk_window_get_role()
}

Returns the role of the window. See Gtk.set_role for further explanation.

Returns

the role of the window if set, or null. The returned is owned by the widget and must not be modified or freed.