#!/usr/bin/env gjs

const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;

Gtk.init(null, null);

var testWindow = new Gtk.Window({title: "test", type: Gtk.WindowType.TOPLEVEL});
var styleContext = testWindow.get_style_context();
var cssProvider = new Gtk.CssProvider();
var css = "GtkWindow { background-color: red }";

testWindow.set_default_size(400, 400);
testWindow.connect("destroy", Gtk.main_quit);
styleContext.add_provider(cssProvider, Gtk.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
cssProvider.load_from_data(css, css.length);

testWindow.show_all();
Gtk.main();