GUI example using GTK.

I have made a set of functions to create in an easy way gui applications using GTK. Of course there are many ways to do this; there is also a graphical way to create a gui (Glade). This approach uses C-functions only.

An important feature of these functions is that the label used for a button is also attached to the widget as user_data. Also, all created windows are linked via a backbone.
In this way the state of all buttons in all windows is reachable everywhere, without the use of global variables.

The set of functions are called "sgtk" (s of super, simple or what you like). They are archived using cvs at:

SGTK functions.

Some simple examples are:

A big example using this set of functions is the weather satellite program. See:

SSI archive.

For binaries of this program and a description see: here.


Compile for Windows.

Needed:

How my development environment looks like (base on mingw version 2.95.2)

For gcc:

Compile flags:

gcc -c -mwindows -Ie:\usr\include\gppm3 -Ie:\usr\include\gtkp -Ie:\usr\include\gtkp\gdk 

Link flags:

gcc -mwindows -Le:\usr\lib -lgtk-1.3 -lgdk-1.3 -lglib-1.3
Option '-mwindows' prevents starting a DOS-shell, but that also means no way to do simple 'printf' to screen.