GTK+ By Example

This book aims to be an accessible introduction into creating applications with GTK+ widget toolkit. Throughout the book we will introduce widgets and give examples on how to use them, then we will ask you expand on these subjects slightly.

Table of Chapters

Why a Wikibook on GTK+

A wikibook is an undertaking similar to an open-source software project: A contributor creates content for the project to help others, for personal enrichment, or to accomplish something for the contributor's own work (e.g., lecture preparation).

An open book, just like an open program, requires time to complete, but it can benefit greatly from even modest contributions from readers. For example you can fix "bugs" in the text (where the bug might be typographic, expository, technical, aesthetic or otherwise) in order to make a better book. If you find an opportunity to fix a bug, simply click on "edit", make your changes, and click on save. Other contributors may review your changes to be sure they are appropriate for the book. If you are unsure, you can visit the discussion page and ask there. Use common sense.

If you would like to make bigger contributions, you can take a look at the sections or chapters that are too short or otherwise need more work and start writing! Be sure to skim the rest of the book first in order to avoid duplication of content. Additionally, you should read the Guidelines for Contributors page for consistency tips and advice.

Note that you don't need to contribute everything at once. You can mark sections as "TODO," with a description of what remains to be done, and perhaps someone else will finish those parts for you. Once all TODO items are finished, we'll have reached our First Edition!

Examples in this book should be written in C as that is the language GTK+ is written in most. Additionally, implementations of the algorithms as an appendix are welcome.



See also the sources list for contributions used with permission.
  • Tim-Philipp Müller wrote the original tutorial on the GtkTreeView widget, this was already extensive in 2005 when he stopped working on it.
Read in another language