Sample GTK-SHARP application.

Summary

The following is a sample GTK# application written in Boo. Unlike some applications, this one actually does something useful - its an image (porn?) browser, and its cross platform to boot!

The code, with comments, comes in just over 100 lines. You will need the glade file below (make sure to save it on whatever output directory you compile the program to).

Thanks to incomp from IRC for spiffying up the sample a bit.

Prerequisites

GTK# Runtime

There are two different runtimes for windows users: the "Win32 Installer" and the "Win32 Runtime Installer." As poorly named as they are, all you need to know is that "Win32 Installer" is for developers and "Win32 Runtime Installer" is for end-users. Guess which one you are.

Mono and GTK# Runtime if you're running under Linux.

The Code.

The Glade File

Pornbrowser.glade is the mark-up file that represents your fancy user interface ,built entirely in Glade. Put it in the output directory of the sample application (where the .exe resides).

The Screenshots

Amazingly, this application runs under Windows and Linux – without recompiling! Who needs Java anymore? (wink)

© 2003-2009 Codehaus