const Mainloop = imports.mainloop;
const Gtk = imports.gi.Gtk;


Gtk.init(null, 0);

let win = new Gtk.Window({type : Gtk.WindowType.TOPLEVEL});
win.set_default_size(400, 300);
// win.set_size_request(400, 300);
win.set_allocation();

let button = new Gtk.Button({label: "Fooo"});

win.add(button);
win.show_all();

Mainloop.timeout_add(2000, function() {
    win.visible ? win.hide() : win.show();
    return true;
});

Gtk.main();
