# Hello World (C)

Susanna Huhtanen
ihmis.suski@gmail.com 2012
Tiffany Antopolski
tiffany.antopolski@gmail.com
Bastian Ilsø
bastianilso@gnome.org
Creating a small "Hello, World" application using GTK+.

# Hello world

For a detailed walk-through of creating a GTK+ dialog in C, see Getting Started with GTK+

Writing a hello world GTK+ dialog in C can be done as seen in the code sample below:

GtkApplication 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 variable called window and assigning it a gtk_application_window_new. The window 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. The code above will create a dialog window similar to what can be seen below: