> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/w/window_creation.md).

# Window creation

### Tk

```ruby
require('Tk')
%s'MainWindow'.new
%S'Tk'.MainLoop
```

### Gtk2

```ruby
var gtk2 = require('Gtk2') -> init
var window = %s'Gtk2::Window'.new
window.signal_connect(destroy => { gtk2.main_quit })
window.show_all
gtk2.main
```
