[MPlayer-G2-dev] Developing a GTK2 GUI

Dan Christiansen danchr at daimi.au.dk
Mon Aug 4 13:22:38 CEST 2003


On Sunday, August 3, 2003, at 10:37 AM, Charles Ezell wrote:

> Gustavo writes:
>
>> Yes, I know that... win32 is the other way (coordinates-based) and I
>> don't know Mac to tell...
>
> Don't know either. :)  But it is probably coord based.  I was also 
> thinking
> about Qt (which I know next to nothing about).

I am not a GUI developer, but maybe I can shed some light on how things 
work on Mac OS X:

On Mac OS X, as you may have heard, there are two independent GUI APIs, 
commonly referred to as Cocoa and Carbon. Cocoa is an Objective-C API 
and comes from NeXT, and it's intended that GUIs aren't generated in 
code, but dynamically from UI files - it encourages complete separation 
between code and UI. Carbon is based on the old Mac OS APIs, and is C - 
but IMO ugly C. You usually write the GUI in code, but very few things 
are handled for you, and good Carbon GUIs are more rare than good Cocoa 
GUIs.

Both are coordinate-based, but in Cocoa, you would usually design the 
elements in Interface Builder and if necessary use that in code. If 
anyone wants to write a native GUI for Mac OS X, I'd say they should 
use Cocoa, and try to keep it separate from the main MPlayer since 
there are lots of files you probably wouldn't want to know about.

Cocoa and Objective-C are fairly difficult to describe since they are 
very different from everything else out there, but they work quite well 
in practise. One good thing about Objective-C, though, is that it isn't 
C++ ;)

- Dan Christiansen



More information about the MPlayer-G2-dev mailing list