GTK+ for Windows

Tor Lillqvist (tml)
GTK+ Pages -- Windows port

Where is GIMP?

There are GIMP installers at gimp-win.sourceforge.net. The installers are created by Jernej Simoncic.

Mailing lists

GTK+ mailing lists are described on the GTK+ website.

There is a mailing list especially for users of GIMP on Windows. Non-Windows-specific GIMP discussions should take place on the general GIMP lists. (See www.gimp.org.)

Subscribe to gimpwin-users

Using GTK+ in your software

In order to use the DLLs as distributed in programs you build yourself, you must use either a recent gcc version, see the MinGW site, or Microsoft Visual C 5 or 6. With gcc, you should use the -mms-bitfields flag. This is because of struct bitfield alignment.

If you use Cygwin's gcc, you should build your GTK+-using application as a non-Cygwin program, i.e. use the -mno-cygwin flag.

You are expected to be pretty experienced to be able to use GTK+ in your own programs. This isn't Visual Basic. Please don't bother the lists with elementary questions without first browsing the archives.

Internationalisation

GTK+ 2.x uses Unicode internally. All strings you pass to GTK+ functions must be in UTF-8. You can not just use non-ASCII characters from your Windows single- or multi-byte codepage. To convert text from the default Windows codepage to UTF-8, it's easiest to use the g_locale_to_utf8 function in GLib. Remember to free the resulting string with g_free when you don't need it any longer.

It is possible to input text in several scripts into GTK+ widgets by switching the Windows input locale. (You can enable new input locales in the Control Panel's Keyboard applet, and switch between them with the button on the taskbar, or a hotkey, usually Left Alt+Shift.)

This also works for Chinese, Japanese and Korean (CJK) input locales, including the IMEs (input method environments) of these languages. (On Win9x you must have the Chinese/Japanese/Korean support and/or the MS Global IME installed. For Win98 these are available from Windows Update under the disguise of CJK support for IE and Outlook Express. This also installs the necessary fonts.)

As GTK+ uses Unicode, text displayed by GTK+ can contain any Unicode character. For this to work you must obviously have appropriate fonts installed, and a proper pango.aliases file.

GTK+ (and GIMP) include message catalogs for several languages. It automatically uses the catalog for the locale chosen in the Control Panel's Regional Settings, if available.

However, note that many of the translations are not complete. Some text is only available in English. If you prefer to have just English messages, set the environment variable LANG to "C" before running a GTK+ application. (This will in no way restrict the characters you can input, or that GTK+ applications can display.) You can also simply delete the message catalogs.

Mirror sites

Any mirror sites are out of my control, and you should be aware that they might not have the latest version.

Links

  • GtkAda, an Ada graphical toolkit that uses GTK+ and runs on Windows.

Valid HTML 3.2!