High Hopes for GTK+ on OSX

by Paul Bates (modified: 2008 Sep 26)

Mac fanatics out there might have heard that there is native implementation of GTK running on MacOSX. There's been a bit of backlash against the port because it doesn't provide a native MacOSX look and feel, but we are assured that they are working on it. So what does this mean for Eiffel and EiffelVision2 applications? Quite a bit, hasta luego X11.

Lets not get ahead of ourselves here, it's not a simple case of installing the framework package. Things must be changed with EiffelVision2. The first step is to swap out the referenced libraries, thankfully the wonderful thing that is Linux/Unix lets us do that with very little hassle using pkg-config. All that needs to be done is to set $PKG_CONFIG_PATH to reference the Gtk.framework, Glib.framework and the Cairo.framework dev pkgconfig directories.

The next part is the more difficult part, remove any and all references to X11 when compiling on MacOSX. This is actually quite a long step, one which we need to evaluate, not only because of code changes but also because it may involve many ancillary changes.

It's worth getting a little excited about, especially knowing that there might be a native theme for GTK applications. Menu bars aside, I hope there are key mappings from CTRL to COMMAND. With the installation of Leopard came spaces so usage CTRL or even Alt is just a nascence now.

I did a little hacking around, using Ubuntu and MacOSX and compiled a single EiffelVision2 tool we use.

I tried further hacking to run EiffelStudio but we run into a wall with some GDK assertions related to pixmap and < 16 bit depths. Looking at the code with Manu, the assertion is no longer required because there is support, it's just not optimized. By the by, the assertion is there, it's raised and prevent EiffelStudio from rendering the UI fully.

Comments
  • Bernd Schoeller (8 years ago 28/9/2008)

    Great! I am looking forward to see everything working.

    Related question: has anybody tried to get GTK+ working on Windows? Compile GEL applications that run on all three platforms?

    • Paul Bates (8 years ago 8/10/2008)

      It seemed my comment got lost in the digital cosmos! Let me try again...

      What would be the point compiling a GTK application to run on Windows, unless it was for legacy purposes? Surely you'd just be using EiffelVision2?

  • Colin LeMahieu (8 years ago 11/10/2008)

    I'm not sure how I missed this post. This is great news.