Crear a xanela principal para o aplicativo
Gtk.Application initializes GTK+. It also connects the x button that's automatically generated along with the window to the "destroy" signal.
We can start building our first window. We do this by creating a class called MyWindow and assigning it a Gtk.ApplicationWindow.
We give the window a property called title. The title can be any string you want it to be. To be on the safe side, it's best to stick to UTF-8 encoding.
Now we have a window which has a title and a working "close" button. Let's add the actual "Hello World" text.
Label for the window
A text label is one of the GTK+ widgets we can use, on account of having imported the GTK+ library. To use it, we create a variable called label and set the text that the label will hold. Finally, we create and run the application:
Gtk.ApplicationWindow can only hold one widget at a time. To construct more elaborate programs you need to create a holder widget like Gtk.Grid inside the window, and then add all the other widgets to it.