Re: GTK+ Portability



Brad House <brad mainstreetsoftworks com> writes: 
> I've written many applications that utilize GTK+ and
> libglade.  I must say, it is by far the best experience
> I've had writing a GUI for any environment.  I've
> recently tackled writing a MAC OS X Carbon application
> and find it very time-consuming.  I was wondering
> if anyone knew of an *active* port of GTK+ to Carbon
> and/or Cocoa for OS X.  This would definately help
> porting of many software applications from
> Linux/Unix to OS X.

There is no active port AFAIK. Maybe a couple people have expressed
interest, but no one has displayed commitment/ability. ;-) At least,
if they have they haven't contacted the list about including it in the
GTK package.

> Anyhow, if not, what would be required in doing so?
> Would it ONLY be GDK that would have to be modified
> for base functionality?

You will probably need to do some minor fixing to GLib for
portability glitches on OS X, and you'll need to figure out a font
backend for Pango (current ones are pangox, pangoxft, pangoft2).
Then you have to hack GDK, yes.

If you want to go the extra mile, you can extend the theme system on
the GTK+ (widget) level to be sure a good OS X emulation theme can be
written. That would be a project for once the GDK port is finished.

> Also, what would be a good starting point? Another port project such
> as DirectFB or Win32, or the straight code-base?

The DirectFB or Linux-fb ports are probably most straightforward,
since they aren't having to fight the semantics of an existing window
system.

The "backend interface" for GDK is sort of poorly-defined, so it's
hard to see easily exactly what you have to implement to write a new
backend; if you wanted to clean that up a bit and document it as you
go, you'd be a hero. ;-) But not expected. (Ideally there would just
be a big struct full of function pointers, and a backend would
implement all those functions, or something like that. And of course
ideally the required semantics of each function would be
documented...)

The X backend is the "master backend" that determines what the
semantics of functions should be. So knowing something about X would
help you.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]