0 Beginner's Tutorials

Although these tutorials are designed for beginners, we can't cover all the basics. Before attempting to follow these tutorials, you are expected to be familiar with the following concepts:

  1. Object oriented programming

  2. The C programming language

By following these tutorials you will learn the basics of GUI programming using Gtk+.

Tutorials

Code samples

To run the code samples:

  1. Copy and paste the code into filename.c

  2. In the terminal type:

    gcc filename.c `pkg-config --cflags --libs gtk+-3.0` -o filename
    ./filename

For more information about compiling Gtk+ programs see Compiling Gtk+ Applications on UNIX.

You can also use the Vala compiler to compile these samples:

  1. In the terminal type:

    valac --pkg gtk+-3.0 filename.c
  2. To run:

    ./filename

TreeView widget

Selectors

File selectors

Font selectors

Color Selectors

Ornaments

Scrolling

Miscellaneous

Exercises