Slashdot Mirror


GTK+OSX for Mac OS X Aqua

Scott Sheppard writes "GTK+OSX has released a native Mac OS X Aqua port of the Linux-based GTK+ open source graphical user interface library. GTK+ (GIMP Toolkit) is a popular widget library supporting graphical applications for Linux. GTK+OSX version 0.1 is an alpha release intended for developers." This could make The Gimp cozy for MacHeads without installing XDarwin and OroborOSX. Looking good!

10 of 235 comments (clear)

  1. Article text (AC not whore) by Anonymous Coward · · Score: 4, Informative

    GTK+OSX has released a native Macintosh Aqua port of the Linux-based GTK+ open source graphical user interface library. GTK+ (GIMP Toolkit) is a popular widget library supporting graphical applications for Linux. GTK+OSX version 0.1 is an alpha release intended for developers.

    "This is great news for the Mac OS X developer community," says Macworld UK contributing editor Scott Sheppard. "It means that many popular Linux programs can be ported to run natively with Mac OS X's Aqua user interface, avoiding the hassle of users having to run an X server."

    GTK+OSX is a spin-off from the Film Gimp project (www.FilmGimp.org). GTK+ is utilized by Film Gimp and many other Linux programs including those of GNU and GNOME. Mac OS X users greeted Mac Film Gimp with enthusiasm at its release earlier in December. But, that X-based compatibility version was merely the first step. GTK+OSX is being developed as the underpinnings for a native Aqua-based Mac OS X port of Film Gimp, scheduled for Q2 2003.

    GTK+OSX project manager Robin Rowe is also the release manager for Film Gimp. "As soon as we released the Fink-based version of Film Gimp we began looking for ways to port natively to Mac OS X", says Rowe. "Andy and I began researching different ways of doing that, either switching to another toolkit or making GTK+ run directly on Aqua."

    GTK+OSX lead developer Andy Prock is also the Mac port lead for Film Gimp. "My curiosity got the better of me", says Prock. "I discovered an abandoned GTK+ for OS 9 Sourceforge project called gtk-mac, and that became the basis for GTK+OSX". GTK+ co-maintainer Owen Taylor says, "The GTK+ team is happy to see the GTK+OSX project working on bringing the power and flexibility of GTK+ to OS X."

    GTK+ has not been available running natively on Macintosh, although there is a native port of GTK+ for Windows. Mac Film Gimp and other GTK+ applications currently use Fink and the XDarwin X server, a technology that enables X Windows programs to run on the Mac almost seamlessly. The relationship between Darwin/Aqua is roughly the same as Linux/X. Both Linux and Darwin are open source, but the Macintosh Aqua interface is not. A fully open source alternative is Darwin/XDarwin. XDarwin enables X to run on Darwin, and it can run "rootless" on the Aqua desktop if a user wishes to run both. However, there's overhead and complexity to running two graphics interfaces simultaneously. That's why it is desirable to have GTK+ run natively on Mac Aqua without X.

    Apple offers four GUI toolkits: Cocoa, Java2, Carbon, and Classic. Carbon and Cocoa are both native Aqua interfaces. Aqua renders utilizing Quartz, a technology Apple based upon NeXT Display Postscript. For GTK+OSX a Carbon-based design was chosen over Cocoa because Rowe was influenced by Patrick Beard's description of the challenges Mozilla Chimera experienced working with Cocoa and Objective C (see http://www.opensourceprogrammers.org/meeting/2002/ Jun19.html). "We wanted an easy-to-maintain design, that would play nice with the Linux and Windows versions of GTK+", says Rowe. "That meant choosing Carbon and C, rather than Cocoa and Objective C."

    A three-step process was mapped for developing the GTK+OSX library. First, do the trivial GTK+ program Hello World, then a mid-sized Linux application, then major applications such as Film Gimp. Rowe had written an article about porting the Linux-based Gothello GTK+ program to Windows (see http://linuxjournal.com/article.php?sid=5574), making it an obvious choice as a test program for a Mac port. Mac Gothello is the first real program to utilize GTK+OSX. Both are available for download at the GTK+OSX site at SourceForge.

    * Pricing and Availability

    Free at http://gtk-osx.sourceforge.net. GTK+OSX is available as source tarball (gz). Download version 0.1 or higher, about 8mb. Optional Mac Gothello download is about 1mb. GTK+OSX has an active mailing list.

    * Further Information

    http://gtk-osx.sourceforge.net

    Robin Rowe, GTK+OSX project manager, 510-235-2397, Robin.Rowe@MovieEditor.com

    Full rez screenshots: http://gtk-osx.sourceforge.net/docs/applications.h tml

  2. Re:Cool - finally XChat! by HLR · · Score: 2, Informative

    FYI... There is an aqua port:
    http://xchataqua.sourceforge.net/

  3. Re:First impertinent post by Anonymous Coward · · Score: 4, Informative

    Aqua is just a look. Quartz is the rendering engine.

  4. Re:Good news... by KAMiKAZOW · · Score: 2, Informative

    IMHO wxWindows is a better solution for cross-platform GUI apps. wxWindows supports MacOS (9 and X), Windows and various Unices. The nice thing is, that wxWindows uses the native widgets (GTK in Unix/Linux) for the rendering.

  5. Re:This could make The Gimp cozy for MacHeads?? by Anonymous Coward · · Score: 4, Informative

    For what it's worth, I started on the gimp, and enjoyed it immensely - it was my introduction to graphics in a purely manual sense (as opposed to rendered 3D imagery and the like). I'm glad I came across it when I did. I never saw much reason to bash photoshop at the time, but other linux graphics users seem to have an obsession with bringing down all things PS.

    I used photoshop after nearly 2 years with the gimp, and while it was initially freaky without my familiar tools I was stunned at the power in PS. It feels simpler, looks simpler, hell I feel like I'm doing less 'work' but there's more of me going into an image, than into using the UI. You can count me among the pro-photoshop people, but on the other hand I'll never bash The Gimp for what it is. It does well for when you don't need all of PS, and I can't see everyone needing to do everything PS does. It's one of the few pieces of software worth the price, IMHO

  6. sorry folks, GTK+-1.2 only :-( by BigSven · · Score: 4, Informative

    The article doesn't mention much about the technical details and does not even tell us which version of GTK+ this port is based on. Unfortunately it seems to be a port of the older GTK+ version 1.2. This is a surprising at first glance since the 2.0 version of GTK+ is much better prepared for different rendering backends (and comes with GDK versions for Win32, linux-fb and DirectFB). Since this port is closely related to FilmGimp, which is unfortunately still dealing with the outdated 1.2 version, this choice becomes clear. Hopefully this project will soon lead to a GTK+-2.x port or Mac users will have to deal with outdated and mostly unmaintained GTK+ applications.

  7. Re:What about a GTK version that uses native widge by IamTheRealMike · · Score: 3, Informative
    I think that it is great that they have ported GTK to so many places, but there is one major problem in my opinion. GTK reimplements all of the native OS widgets

    I think you missed something pretty important. GTK is the native OS widgets for Linux (well, originally written for, you can use Qt as well). What they have actually ported is GDK, which is a display system abstraction library. A GTK program will never use Windows/MacOS widgets natively because that is not its purpose, if you want that you should be using a widget toolkit abstraction lib like SWT or wxWindows. Or you could of course write a theme engine for GTK that simulates other platforms.

  8. Re:First impertinent post by Twirlip+of+the+Mists · · Score: 3, Informative
    Compare helloworld.c from HelloGTK (with the comments stripped out for brevity's sake and massaged to appease the stupid lameness filter [which should ignore stuff inside ecode tags, dammit]) to the equivalent Controller.m from Hello.app, which I wrote in Objective C using the Cocoa API with Project Builder and Interface Builder in about two minutes.

    helloworld.c
    #include "HelloGTK_Prefix.h"

    #include <gtk/gtk.h>

    void hello( GtkWidget *widget, gpointer data )
    {
    g_print ("Hello World\n");
    }

    gint delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
    {
    g_print ("delete event occurred\n");
    return(TRUE);
    }

    void destroy( GtkWidget *widget, gpointer data )
    {
    gtk_main_quit();
    }

    int main( int argc, char *argv[] )
    {
    GtkWidget *window;
    GtkWidget *button;

    gtk_init(&argc, &argv);

    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

    gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL);

    gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (destroy), NULL);

    gtk_container_set_border_width (GTK_CONTAINER (window), 10);

    button = gtk_button_new_with_label ("Hello World");

    gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (hello), NULL);

    gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy), GTK_OBJECT (window));

    gtk_container_add (GTK_CONTAINER (window), button);

    gtk_widget_show (button);

    gtk_widget_show (window);

    gtk_main ();

    return(0);
    }
    Controller.m
    #import "Controller.h"

    @implementation Controller

    - (IBAction)doHelloButtonAction:(id)sender {
    [NSApp terminate:HelloButton];
    }

    @end
    Which API would you rather use?
    --

    I write in my journal
  9. Re:Probably a stupid question by robinsrowe · · Score: 2, Informative

    GTK+OSX isn't completely finished yet (this is the first release), but we hope everyone will start building native Mac GTK+ apps with it today. Happy New Year, Robin

  10. Re:First impertinent post by Mr.+Frilly · · Score: 2, Informative
    uh, no. The equivalent to your objective C hello world app would be:
    #include <gtk/gtk.h>

    int main( int argc, char *argv[] ){
    GtkWidget *window, *button;

    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    button = gtk_button_new_with_label ("Hello World");
    gtk_container_add (GTK_CONTAINER (window), button);

    gtk_widget_show_all (window);
    gtk_main ();

    return(0);
    }